Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing text columns in csv file

Pulling how?


---
Message posted from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel2007 - More columns when importing ascii file? MG Excel Discussion (Misc queries) 2 July 18th 07 05:44 PM
skip columns when importing from text shakeydth Excel Discussion (Misc queries) 1 April 15th 07 05:38 PM
Importing CSV file (saved as Text) into XL as Text -- over 60 colu sbp Excel Discussion (Misc queries) 1 October 14th 06 11:50 PM
Importing text file, only option to edit existing file smokey99 Excel Discussion (Misc queries) 8 April 26th 06 09:08 PM
Text to Columns / Importing Data John Thomson Excel Discussion (Misc queries) 0 May 4th 05 08:21 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"