ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening .csv (https://www.excelbanter.com/excel-programming/288639-opening-csv.html)

greg

Opening .csv
 
Excel 97.

I have a VBA routine that opens a .csv file and processes
some information.

My problem is that excel changes some of the fields
automatically upon opening it. For example, I have a
field that reads "1002.10". Excel thinks that it is a
number and automatically lops off the trailing zero.

Is there anyway to turn off a setting so that excel will
just open the .csv file as text and not try and convert
any fields?

Thanks,

Greg

Jim Rech

Opening .csv
 
Excel automatically parses CSV files. If you change the file extension to
something else, like TXT, Excel will instead pop up the File Import Wizard
where you can make choices. On the third screen (I think) you can choose
the formatting of each field. You'd pick Text for this one.

--
Jim Rech
Excel MVP



greg

Opening .csv
 
Thanks Jim.

I was hoping that I could some how automatically turn off
that automatic parsing. Oh well, I will use your
suggestion. Thanks.



-----Original Message-----
Excel automatically parses CSV files. If you change the

file extension to
something else, like TXT, Excel will instead pop up the

File Import Wizard
where you can make choices. On the third screen (I

think) you can choose
the formatting of each field. You'd pick Text for this

one.

--
Jim Rech
Excel MVP


.



All times are GMT +1. The time now is 11:47 AM.

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