Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Importing text columns in csv file
Is there any way to force Excel to treat a column of data
in a .csv file as text, rather than as "general"? I have a column of numbers for which I need to keep the leading zeroes (zip codes), and standard behavior opening a .csv file treats the value as a number and strips the zeroes. I'm using a macro, but using FieldInfo:=Array(Array(1, 2)) as a qualifier on Workbooks.OpenText doesn't seem to have any effect on a .csv file, though it works fine for a .prn or .txt file. Is my only choice to rename the file? I guess I can do that inside the macro, but it seems a very inconvenient way to get a very basic operation done. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Importing text columns in csv file
Before the data is moved you should format the cells as text:
Main Menu Format--Cells--"Number" Tab Select "Text" You may need to paste using a right click and "Paste Special"/"Values" -Piku -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Importing text columns in csv file
Sorry, this doesn't help. I'm not copying and pasting; I'm
pulling the information in from a .csv text file. Kelvin Smith -----Original Message----- Before the data is moved you should format the cells as text: Main Menu Format--Cells--"Number" Tab Select "Text" You may need to paste using a right click and "Paste Special"/"Values" -Pikus --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Importing text columns in csv file
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel2007 - More columns when importing ascii file? | Excel Discussion (Misc queries) | |||
skip columns when importing from text | Excel Discussion (Misc queries) | |||
Importing CSV file (saved as Text) into XL as Text -- over 60 colu | Excel Discussion (Misc queries) | |||
Importing text file, only option to edit existing file | Excel Discussion (Misc queries) | |||
Text to Columns / Importing Data | Excel Discussion (Misc queries) |