ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Stop Excel from converting text labels in CSV files to Values (https://www.excelbanter.com/excel-discussion-misc-queries/3534-stop-excel-converting-text-labels-csv-files-values.html)

Just Want a Label!

Stop Excel from converting text labels in CSV files to Values
 
I have a rather frustrating problem. We have a macro that extracts plant
codes from a list and creates a csv file of these codes. Many of these codes
have leading zeros, (ie. 0075, 0100, etc.) When this csv file is opened in
Excel, it converts the labels to values (ie. 75, 100, etc.). I have opened
the csv file in a text editor, and it shows the correct label - with leading
zeros. Is there a way to get Excel to open this file without converting the
text field to values?

Peo Sjoblom

Rename the file to extension *.txt, then the text import wizard will popup
when you open it, click next twice and select the column in question, then
under column data format select text

Regards,

Peo Sjoblom

"Just Want a Label!" wrote:

I have a rather frustrating problem. We have a macro that extracts plant
codes from a list and creates a csv file of these codes. Many of these codes
have leading zeros, (ie. 0075, 0100, etc.) When this csv file is opened in
Excel, it converts the labels to values (ie. 75, 100, etc.). I have opened
the csv file in a text editor, and it shows the correct label - with leading
zeros. Is there a way to get Excel to open this file without converting the
text field to values?



All times are GMT +1. The time now is 12:14 PM.

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