View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob[_73_] Bob[_73_] is offline
external usenet poster
 
Posts: 2
Default Importing CSV just like Excel opening CSV

On Sep 18, 9:19 am, "papou" wrote:
Hi OssieMac
If I understand correctly, I think that Bob has a problem with the opening
of CSV files in Excel using VBA.



The above is correct. Forgetting VBA for a moment, if I see the CSV
in Windows Explorer, and open it using Excel, all is fine.

On the other hand, if I am writing VBA inside of an Excel document,
and tell Excel to import the same CSV using the Sheet.QueryTable
method (and various combinations of delimiter parameters), it does not
come in cleanly. I am discouraged by the fact that you may have dealt
with this and found no solution.

I guess at this point, I may try to programmatically open the CSV into
an independent spreadsheet (as if I did it through Windows), then copy
the sheet into the workbook where the VBA is running. Sounds like you
may have tried this but I am going to give it a shot since it won't
take too long.

Thanks
Bob