PDA

View Full Version : issue reading from a .csv file



mibushk
04-27-2012, 12:00 AM
I am trying to make an export from a tool and then import in a second one
this is done via vba

I export info in a .csv file
and then read the .csv file with

objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathToTextfile & ";" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited"""

the weir part now is:

but some data can not be read...even if this data is written (existing) in the csv file....it seems like it's null...it can't be read

can you give me any hints?

Kenneth Hobs
04-27-2012, 05:50 AM
Maybe it is not delimited by quotes?

If you open it in Excel, is it shown?

You can post an example csv and xlsm for us to troubleshoot if you like.

snb
04-27-2012, 06:30 AM
Please explain the relationship between your question and Excel (since this is an Excel help subforum).

Teeroy
04-27-2012, 05:59 PM
I know it's simplistic but have you tried:
Workbooks.Open Filename:="Filename.csv"