How to connect to .CSV file ?



I have a .CSV file (comma delimited) that I want to open using OLEDB, but I
get the error "External table is not in the expected format."
If I save the .CSV file to an .XLS file, I can open the connection with no
problem.
What is the correct way to open a .CSV file ?
If I can not open the CSV file, how can I programmatically save the CSV file
to an XLS file ?
Thanks a lot.

dim myCon OleDb.OleDbConnection
myCon = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\file.csv; Extended Properties=""Excel 8.0; HDR=NO; IMEX=1""")
--> error "External table is not in the expected format."


.



Relevant Pages

  • Re: Comma Delimited
    ... You can open the file in Excel (if it's an XLS file or if it's a CSV file), ... then File/Save As and be sure to select the CSV format. ...
    (microsoft.public.excel.misc)
  • Hidden rows still visuale under CSV
    ... The file Extension .CSV stands for Comma Separated Values. ... When you save an Excel .xls file as a .CSV file only the ...
    (microsoft.public.excel.misc)
  • Re: Read from XLS and substitute values in Ruby (Watir)
    ... Also,Is there a way to read from csv file or xls file because currently ... tokens as separate parameters for the text fields. ... Let's assume that tabs are used instead of spaces between the fields. ...
    (comp.lang.ruby)
  • RE: How to convert .CSV file to .XLS File in C# Programming?????
    ... I try to attach my .XLS format spec but I m new to this site. ... My CSV file Contains Data like. ... My XLS file Contains Data Like. ... I got the code converting CSV file to XLS file. ...
    (microsoft.public.excel.programming)
  • RE: How to convert .CSV file to .XLS File in C# Programming?????
    ... I try to attach my .XLS format spec but I m new to this site. ... My CSV file Contains Data like. ... My XLS file Contains Data Like. ... I got the code converting CSV file to XLS file. ...
    (microsoft.public.excel.programming)