Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Exporting to CSV text file - precision problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rochelle - 22 Sep 2005 18:04 GMT
Hi,

I am trying to export an Access table to a CSV text file.  I am using Access
2002.  (The database was created in Access 2000.)  I have several fields that
contain 8 decimal digits of precision when viewed from Access.  However, only
2 of the 8 decimal places get exported to my text file.

When I try the export to Excel, all 8 decimal digits show up.

Is there a way to specifiy that all 8 decimal digits get exported to the CSV
text file?

Thanks,

Rochelle
David S - 23 Sep 2005 02:49 GMT
When exporting to CSV files, the precision of the decimal digits is
determined by the Windows environment. You can either change it for Windows
overall by going to Start -> Settings -> Control Panel -> Regional and
Language Options -> Customise and change the "No. of digits after decimal"
field, or you can use a query to explicitly format this field eg. Format(
[FieldName], "0.0000000").

If you do it the second way, you may need to tell your csv export to not use
quotes to qualify text, of it will put quotes around them, which would make
things like Excel think it was text instead of being a number...
John Vinson - 23 Sep 2005 06:03 GMT
>Is there a way to specifiy that all 8 decimal digits get exported to the CSV
>text file?

Use the Format() function in a Query to explicitly cast the number
into an 8-decimal string:

ExpNum: Format([numberfield], "#.00000000")

                 John W. Vinson[MVP]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.