View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Volker Jordan Volker Jordan is offline
external usenet poster
 
Posts: 4
Default Workbooks.OpenText Method / FieldInfo

"goshute" wrote:


Its the same. Manually the 0 are converted to numbers.


No, You can not import a .csv file with all columns defined as text
because Excel is trying to be helpful and defining what looks like
numbers as numbers.
I know of two ways to handle this.
Change the .csv to .txt
Insert a single quote ' as the first character in these fields forcing
Excel to handle as text.


The problem is, that I have to read csv data, that is not generated by
myself. So renaming and inserting a quote in not an option. I wonder, why
there is no hint in the documentation, that FieldInfo does not work with
files ending with .csv.

Volker