View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LeeL LeeL is offline
external usenet poster
 
Posts: 16
Default How to open CSV as text?

Cannot get a CVS file to open formatted as text. Using below opens columns
with numbers formatted as general, losing preceding zeros. Any ideas?

Workbooks.OpenText Filename:="C:\Test\INVBAL.csv", Origin:=437, _
StartRow:=1, DataType:=xlDelimited, Comma:=True, _
FieldInfo:=Array(Array(1, 2), Array(2, 2), Array(3, 2))

I tried to change the file extension to .txt, but the data is corrupted or
encoded when trying to open.
--
Thanks & Best Regards