In Access 2007 CSV Export: Disable Scientific Notation

When exporting CSV from Access 2007, it automatically converts decimals to scientific notation.

Unfortunately, the tool that receives them treats these fields as text and displays them as is.

Exported values ​​are a query that runs against some Excel-related tables, and they display perfectly in the query view.

Is there a way to turn off automatic conversion to scientific notation.

those. if it appears as 0.007 in the request, will it be displayed as 0.007 on csv output, and not on 7E3?

Note. I need to use Excel and Access for this. As far as I would like to switch to SQL Server, my wife would be unhappy if I put her on my work laptop!

+4
source share
2 answers

You can write a short VBA code to access data queries from a linked table or an Access query and write them to a text file, thereby creating your own .CSV and speaking the "Wizard". I never liked the Export Wizard, and I just created the files myself.

+1
source

You have several options:

  • you can use the Format() function directly in your query to force the data in the corrupted columns to format a in a certain way, for example:

     SELECT ID, Format([Price],"standard") as Pricing FROM ORDERS; 
  • You can write your own CSV export procedure to VBA.
    I recently posted recently as an answer to this question .

You can easily change the code to format numeric types in a specific way.
If you don’t know how, let me know and I will change the code and publish it here.

+5
source

All Articles