How to disable Excel’s auto recognition of numbers and text

calendar_today Asked Mar 23, 2010
thumb_up 4 upvotes
history Updated April 16, 2026

Question posted 2010 · +8 upvotes

I used Python to generate a CSV file. But when I open it in Excel, Excel will auto recognize a string into a number if it could be converted.

e.g.33E105 becomes 33*10^105, which is actually an ID, not a number.

How to disable this in Excel while opening a CSV file? Or I need to resort to a excel-python library to output a excel file and specify the format myself?

I also found a similar question without good answers on the web.

Thanks!

Accepted answer +4 upvotes

You could precede it with a single quote, forcing it to text.

A fun answer is you could keep the first eight rows blank (it only processes the first eight rows to determine data type), although I think this may blank all your data entirely. You could hide those empty rows.

Top excel Q&A (6)

+4 upvotes ranks this answer #163 out of 167 excel solutions on this site .