View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Problems importing a CSV-file

The following works by me:

Sub readCSV()
Workbooks.OpenText _
Filename:="U:\family2.csv", _
semicolon:=True
End Sub

HTH
--
AP

"ApPojken" a écrit
dans le message de
...

Hi!

I have been googleling around for a whole day without coming to a
conclusion with this issue.

I am trying to import a CSV-file (semicolon seperated values). I have
tried and tried with all sollutions I have found but nothing works. It
still imports it with all the semicolons and does not seperate the
fields.

I have tried this:
Workbooks.Open "C:\test\Planner.csv", , , , xlCSV, , , , ";"
this:
Workbooks.Open FileName:=C:\test\Planner.csv, Format:=xlCSV, _
Delimiter:=";", ReadOnly:=True

Neither works. I have also tried to change the ";" to the number for
semicolon and that didn't work either.

This works:
Shell "Excel.exe " & "C:\test\Planner.csv", vbMinimizedNoFocus
But the problem is when I open the document this way I dont get the
link requiered for my VBA module to work.

Please, please, please help a desperate man!

/Rob


--
ApPojken
------------------------------------------------------------------------
ApPojken's Profile:

http://www.excelforum.com/member.php...o&userid=32516
View this thread: http://www.excelforum.com/showthread...hreadid=523012