J
JimHeavey
I am trying to read an excel file using .Net OLEDB connection. I am able to
open the file, but once I attempt to retrieve a datareader I get an "object
not found" error message. The specific message is as follows "The Microsoft
Jet database engine could not find the object 'RuleDescriptions'. Make sure
the object exists and that you spell its name and the path name correctly."
"RuleDescriptions" is the name of the sheet which contains the information,
in fact it is the only sheet in the excel file. I have tried changing the
name of the sheet, hoping that perhaps that there might be something wrong
how I keyed in the name of the sheet. I have copied the sheet name directly
into the code, but it always gives the same error message.
The SQL statement looks like the following: "Select * From
[RuleDescriptions]"
My connection string looks like the following:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\temp\COMBO EDIT
DESCRIPTIONS.xls;Extended Properties="Excel 8.0;HDR=YES;IMEX=1"
Any ideas as to what I am doing wrong?
open the file, but once I attempt to retrieve a datareader I get an "object
not found" error message. The specific message is as follows "The Microsoft
Jet database engine could not find the object 'RuleDescriptions'. Make sure
the object exists and that you spell its name and the path name correctly."
"RuleDescriptions" is the name of the sheet which contains the information,
in fact it is the only sheet in the excel file. I have tried changing the
name of the sheet, hoping that perhaps that there might be something wrong
how I keyed in the name of the sheet. I have copied the sheet name directly
into the code, but it always gives the same error message.
The SQL statement looks like the following: "Select * From
[RuleDescriptions]"
My connection string looks like the following:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\temp\COMBO EDIT
DESCRIPTIONS.xls;Extended Properties="Excel 8.0;HDR=YES;IMEX=1"
Any ideas as to what I am doing wrong?