Exporting CSV Losing Precision

spg2112

Active Member
Joined
Feb 27, 2002
Messages
316
Hey all,

I'm exporting a table to a CSV format and I need my quantity field to retain the 5 or 6 decimal places. It's truncating it to 1 decimal. I tried changing the format from a number to text but I get 'some data may be lost errors'. Any ideas? Thanks!

Steve
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Are you exporting a table or query?
Does the table/query you are exporting show 6 decimal places?
How are you exporting it?
Are you using a saved Export Specification (if so, you may need to rebuild it)?
What program are you using to view your exported CSV?
 
Upvote 0
Are you exporting a table or query?
table

Does the table/query you are exporting show 6 decimal places?
Yep

How are you exporting it?
Via Access esxport to text wizard

Are you using a saved Export Specification (if so, you may need to rebuild it)?
No but I tried creating one for it and couldn't find where to edit the field format

What program are you using to view your exported CSV?
Excel
 
Upvote 0
So in a nutshell, leave it as a number in your table.
Then create a new query off of this table.
Add all your fields except this number field.
Let's say the number field is named "Amount". Enter this calculation into the query to convert it to text with 6 decimals:
Code:
NewAmt:format([Amount],"0.000000")
Now do the export from this query.
 
Upvote 0

Forum statistics

Threads
1,203,606
Messages
6,056,280
Members
444,854
Latest member
goethe168

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top