FG

Formatting a comma-delimited CSV to force Excel to interpret value as a string

Fresh3 days ago
Mar 15, 2026318955 views
Confidence Score1%
1%

Problem

I've been searching around for a while trying to figure out how to output a CSV file in such a way to force Excel to interpret the values as a string and not try to convert them to numbers or dates. e.g.: Excel tries to "intelligently" convert all these to its native date/number formats. Is there a way around that? EDIT: Clarified the intent of my question, sorry for confusion.

Error Output

"141", "10/11/2002", "350.00", "1311742251"

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Formatting a comma-delimited CSV to force Excel to interpret value as a string

Low Risk

For those that have control over the source data, apparently Excel will auto-detect the format of a CSV field unless the CSV column is in this format: eg... It also works in Google Spreadsheet, but not sure if other spreadsheet apps support this notation. If you suspect any the data may contain quotes itself, you need to double-escape them, like this... (EDIT: Updated with corrections, thanks DMA57361!)

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment