Export DOUBLE field to CSV as number with precision (1 Viewer)

winshent

Registered User.
Local time
Today, 15:29
Joined
Mar 3, 2008
Messages
162
Hi

Following on from my previous issue, I now have a new problem..

I have written an export routine to dump data from and access database to CSV. The app then automatically creates an excel file and pivot table thats connected to the output.. This now all works and is documented in this thread..

I now have the issue that Access rounds DOUBLE fields to 2 decimal places when outputing to CSV..

I have read up on the issue and a work around is to use the FORMAT function. However, as the DOUBLE field is now text in the CSV, it cannot be analysed using Pivots..

The code I am using to create the CSV is as follows
Code:
DoCmd.TransferText acExportDelim, "", Tablename, ExportPath, True

A colleague has suggested iterating thru and writing each record as a text stream to a CSV file.. Would this even work?

Any other ideas how I can get around this ?
 

Users who are viewing this thread

Top Bottom