ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there a fix to stop Excel from reformatting columns? (https://www.excelbanter.com/excel-discussion-misc-queries/30847-there-fix-stop-excel-reformatting-columns.html)

vmdavis

Is there a fix to stop Excel from reformatting columns?
 
I have an Excel spreadsheet with an xls extension. WHen I save the file as a
csv, the column of numbers (format=text) converts to (format=general).

Example: 2530160313000 converts to 2.53016E+12 in the cell but shows
correctly in the fx window?

If you have any ideas please share. Thanks



Dave Peterson

When you save the data into that .csv file, you're creating a simple text file.
It contains no special formatting for anything.

When excel reopens it, it just uses its defaults (treat things that look like
numbers as numbers).

If you want more control, rename your .csv file to .txt.

Then when you file|open your .txt file, you'll see the Import wizard that'll ask
you how each field should be treated. (You'll choose Text for that long number
field.)

vmdavis wrote:

I have an Excel spreadsheet with an xls extension. WHen I save the file as a
csv, the column of numbers (format=text) converts to (format=general).

Example: 2530160313000 converts to 2.53016E+12 in the cell but shows
correctly in the fx window?

If you have any ideas please share. Thanks


--

Dave Peterson


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com