I'm using vb.net 2003 and I want to read excel file 2003 using OleDb Connection. But I have a problem when I'm putting the IMEX=1
property on the connection String. But when I have to romove this IMEX
property, the system run without an error. Here is my connection string
xlsCon = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pathName & " ; Extended Properties=Excel 8.0;IMEX=1")
Can any one help me on how could i fix this error? I need to put IMEX property so that it tells the driver to always read intermixed (string, integer, date) data type on each cell.
Here is the error I've encountered.
System.Data.OleDb.OleDbException: Could not find installable ISAM.
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Production_Tracking_System.frmPMEFNATUpload.getUploadedData(String pathName) in D:LegacyDevelopmentPTS 2 VSG-NATFormsfrmPMEFNATUpload.vb:line 434
See Question&Answers more detail:os