Export Microsoft Access Data to CSV with Quoted Text and No Decimals
Question details
Export Microsoft Access data to a CSV file with quoted text and numeric values without decimal places.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- The user needs a comma-delimited export that preserves text containing commas and displays selected numeric fields as whole numbers.
- Observed behavior
- Access may export numeric fields with decimal places, and text containing commas needs quotation marks to remain in one CSV field.
Identify the numeric fields that should have no decimal places and check whether they contain Null values or fractions. Decide whether rounding fractional values to whole numbers is acceptable.
Export a query with whole-number fields and quoted text
Use a query to convert selected numeric fields, then set the CSV delimiter and text qualifier in the export wizard.
In Access, select Create > Query Design, add the source table or query, and add the fields you want to export.
In an empty Field row of the query design grid, enter ExportNumber: IIf(IsNull([MyField]), Null, CLng(Nz([MyField], 0))). Replace MyField with your field name. Use the calculated field in place of the original numeric field.
Save and select the query, then choose External Data > Text File in the Export group. Enter a file name ending in .csv and leave the formatting and layout option unchecked to use the delimited export wizard.
In the Export Text Wizard, select Delimited, choose Comma as the delimiter, and select the double quotation mark as the text qualifier. Use Advanced to review settings and save an export specification if you need to reuse them.
Select Finish, then open the CSV in a text editor. Check that the selected numeric values have no decimals and that a text value containing a comma is enclosed in double quotes.

Review Your Exported CSV in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheets. Open an exported CSV in WPS Spreadsheets to review its rows and columns, then work with familiar Excel formats as you migrate your files.

Frequently Asked Questions
Why does my Access CSV export show decimal places?
Access may use a numeric field's defined precision or formatting during export. Use a query with CLng() for the affected field if rounding to a whole number is appropriate.
How do I keep a comma inside a text value in one CSV field?
In the Export Text Wizard, choose Delimited, select Comma as the delimiter, and select the double quotation mark as the text qualifier. Verify the resulting file in a text editor.
What happens if a numeric field contains Null?
CLng() cannot convert Null directly. In Query Design, use an expression such as IIf(IsNull([MyField]), Null, CLng(Nz([MyField], 0))) to preserve Null while safely converting non-Null values.
Can I reuse the same CSV export settings?
Yes. In the Export Text Wizard, select Advanced and save an export specification. Use that specification for later exports that need the same settings.




