ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to use the exact format in a csv file when opening a csv file (https://www.excelbanter.com/excel-discussion-misc-queries/50148-how-use-exact-format-csv-file-when-opening-csv-file.html)

tong

How to use the exact format in a csv file when opening a csv file
 
As captioned, in my .csv file, Field A is 02, Field B is 1.2%, Field C is
0.0, but after open in Excel, Field A becomes 2, Field B becomes 1.20%, Field
C becomes 0.
How to prevent Excel change the value format when opening a csv file?

Thx!!

Dave Peterson

I don't think you can.

But if you rename the file from *.csv to *.txt, you can specify each field in
the data import wizard. That way you could treat the 02 as text (not numeric).

But the 1.2% will come in the way excel likes.

A more common approach would be to just format the cells the way you want after
you import the data.



tong wrote:

As captioned, in my .csv file, Field A is 02, Field B is 1.2%, Field C is
0.0, but after open in Excel, Field A becomes 2, Field B becomes 1.20%, Field
C becomes 0.
How to prevent Excel change the value format when opening a csv file?

Thx!!


--

Dave Peterson


All times are GMT +1. The time now is 07:49 PM.

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