G
Guest
Hello there
I am using the following code to query data from Excel shee
try
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"DataSource=C:\\Temp\\MSFT.xls" +"Extended Properties=Excel 8.0;";
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
}
catch(Exception E)
{
Console.WriteLine(E.Message);
}
But got the following error message"Could not find installable ISAM."
Anybody knows about what I did wrong
Thanks muc
Qin Zhou
I am using the following code to query data from Excel shee
try
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"DataSource=C:\\Temp\\MSFT.xls" +"Extended Properties=Excel 8.0;";
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
}
catch(Exception E)
{
Console.WriteLine(E.Message);
}
But got the following error message"Could not find installable ISAM."
Anybody knows about what I did wrong
Thanks muc
Qin Zhou