Bad data on TransferText to csv file

kmurtha

Board Regular
Joined
Mar 24, 2004
Messages
52
Hello.

I am not get test data when I tranfer from a table to a csv file. I am get exponential notation rather than the true text. What am I doing wrong?

Here is the command I am using.
DoCmd.TransferText acExportDelim, "", "NevWkTable", "C:\Documents and Settings\kpm007\My Documents\Test.csv", False, ""

Here are the results(the errors are in bold) as they appear in Excel
5 1111111111 Sally Smith 1.11111E+18 D 1.11111E+34 A 9/21/2004 0:00 9/21/2004 0:00
6 2222222222 Jim Jones 2.22222E+18 S 2.22222E+34 A 9/23/2004 0:00 9/23/2004 0:00
7 3333333333 alan adams 3.33333E+18 s 3.33333E+34 S 9/23/2004 0:00 9/23/2004 0:00


Thanks for your help
:oops:
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
If you look at the CSV file in a text editor, you will see that the values if the values are stored as Text in Access, they are exported as a Text in the CSV file (you will see quotes around the number). Unfortunately, when Excel opens the file, for some reason it converts them to a number.

There are two ways around this:
1. If you want the file two end up in Excel, use TransferSpreadsheet to send it directly to Excel. This will keep the Text format.
2. If it needs to be sent out to a text file, after you export it, change the .CSV extension to .TXT. Then, instead of Excel automatically formatting it when opened, you will be forced to use the Import Wizard, where you have control of the field types.
 
Upvote 0

Forum statistics

Threads
1,221,814
Messages
6,162,135
Members
451,744
Latest member
outis_

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