Posted on: 5/18/2015 10:28:15 PM | Views : 661

Hi All,
I am trying to read CSV files.  Below is the code. The ace engine is not downloaded on our server so I have to use csv file in my code.
I am getting an error saying that "External table is not in the expected format."
Private Sub Import_To_Grid(FilePath As String, FileName As String, Extension As String, isHDR As String) Dim conStr As String = "" Select Case Extension Case ".csv" conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FilePath + ";Extended Properties=Excel 8.0;" Exit Select End Select conStr = [String].Format(conStr, FilePath, isHDR) Dim connExcel As OleDbConnection = New OleDbConnection(conStr) Dim cmdExcel As OleDbCommand = New OleDbCommand() Dim oda As OleDbDataAdapter = New OleDbDataAdapter() cm ...

Go to the complete details ...