ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   .csv drops "0" when saved, even if file was set as "text". (https://www.excelbanter.com/excel-discussion-misc-queries/53281-csv-drops-0-when-saved-even-if-file-set-text.html)

TRminator

.csv drops "0" when saved, even if file was set as "text".
 
Hi. I need to save files as .csv for importing Product Codes into my
purchasing system. My problem is that, even if I change the relevant column
to "TEXT", after saving the file as a .csv the "0" or even sometimes "00"
that appear at the beginning of many of the product code is being dropped by
Excell when the file is reopened.

Any thoughts on how I can solve this issue?

David Biddulph

.csv drops "0" when saved, even if file was set as "text".
 
"TRminator" wrote in message
...
Hi. I need to save files as .csv for importing Product Codes into my
purchasing system. My problem is that, even if I change the relevant

column
to "TEXT", after saving the file as a .csv the "0" or even sometimes "00"
that appear at the beginning of many of the product code is being dropped

by
Excell when the file is reopened.

Any thoughts on how I can solve this issue?


Change the file name to txt rather than csv, & when you read in through the
import wizard, set the relevant columns to format as "Text".
--
David Biddulph



Dave Peterson

.csv drops "0" when saved, even if file was set as "text".
 
If you don't need to reimport that data back into excel (say you're just
verifying that the creation of the .csv file worked), then you could use Notepad
to do that verification.

You'll see the leading 0's in that .csv text file.

TRminator wrote:

Hi. I need to save files as .csv for importing Product Codes into my
purchasing system. My problem is that, even if I change the relevant column
to "TEXT", after saving the file as a .csv the "0" or even sometimes "00"
that appear at the beginning of many of the product code is being dropped by
Excell when the file is reopened.

Any thoughts on how I can solve this issue?


--

Dave Peterson

TRminator

.csv drops "0" when saved, even if file was set as "text".
 
Hi David.

I experimented with a few lines from the main record. When I open the .txt
file to view it the "0" have been dropped there as well. Please note also
that I am dealing with 29,000 lines (too big for a .txt file?) and that I'm
exporting from excel/windows and importing into my system, not the other way
around so i don't get to use the Wizard. thanks for taking the time out to
try and help though David, I really do appreciate it.

"David Biddulph" wrote:

"TRminator" wrote in message
...
Hi. I need to save files as .csv for importing Product Codes into my
purchasing system. My problem is that, even if I change the relevant

column
to "TEXT", after saving the file as a .csv the "0" or even sometimes "00"
that appear at the beginning of many of the product code is being dropped

by
Excell when the file is reopened.

Any thoughts on how I can solve this issue?


Change the file name to txt rather than csv, & when you read in through the
import wizard, set the relevant columns to format as "Text".
--
David Biddulph





All times are GMT +1. The time now is 10:56 PM.

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