Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/103259

From BetaArchive Wiki

ACC1x: Problem Exporting "Single" Numeric Data to MS Excel

Q103259



The information in this article applies to:


  • Microsoft Access versions 1.0, 1.1





SYMPTOMS

You may be unable to export numeric data to Microsoft Excel if the Microsoft Access data has a Number data type, a Single field size, and a fixed format. When you export the table, the numbers lose their formatting and are altered slightly.



RESOLUTION

Format the data stored as Number-Single in Microsoft Access as "fixed - 2 decimal places" in Microsoft Excel. All the data stored as Number-Single in Microsoft Access is also stored as Number-Double.



STATUS

Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.



MORE INFORMATION

Steps to Reproduce Behavior



  1. Create a new table with two fields:

          FieldName:  NumSingle
             Data Type: Number
             Field Size: Single
             Format: Fixed
             Decimal Places: 2
    
          FieldName:  NumDouble
             Data Type: Number
             Field Size: Double
             Format: Fixed
             Decimal Places: 2 


  2. Add the following data:

          NumSingle       NumDouble
          -------------------------
          0.00            0.00
          0.01            0.01
          0.02            0.02
          0.03            0.03
          0.04            0.04
          0.05            0.05
          0.06            0.06
          0.07            0.07
          0.08            0.08
          0.09            0.09
          0.10            0.10
          0.10            0.10
          0.11            0.11
          0.12            0.12
          0.13            0.13
          0.14            0.14
          0.15            0.15
          0.16            0.16
          0.17            0.17
          0.18            0.18
          0.19            0.19
          0.20            0.20 


  3. Export the file to Microsoft Excel and open it.

       The data appears as follows:
    
         NumSingle        NumDouble
         --------------------------
         0                0.00
         0.01             0.01
         0.02             0.02
         0.029999999      0.03
         0.039999999      0.04
         0.050000001      0.05
         0.059999999      0.06
         0.07             0.07
         0.079999998      0.08
         0.090000004      0.09
         0.100000001      0.10
         0.100000001      0.10
         0.109999999      0.11
         0.119999997      0.12
         0.129999995      0.13
         0.140000001      0.14
         0.150000006      0.15
         0.159999996      0.16
         0.170000002      0.17
         0.180000007      0.18
         0.189999998      0.19
         0.200000003      0.20 


Numbers stored as "singles" are imported as numbers with nine decimal places. Numbers stored as "doubles" are imported with no errors.

Keywords : kbinterop
Issue type : kbbug
Technology :


Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.