Problem in Importing data from Excel (Urgent)

G

Guest

Hi
I am using following code to Import data from Excel File in .NET 2005

DataSet myDataSet = new DataSet();

string strConn = @"Provider = Microsoft.Jet.OLEDB.4.0; Data Source =
c:\test.xls;Jet OLEDB:Engine Type=5; Extended Properties=Excel 9.0";

OleDbConnection conn = new OleDbConnection(strConn);

OleDbDataAdapter addapter = new OleDbDataAdapter();

addapter.SelectCommand = new OleDbCommand("Select * From Mercury$", conn);

addapter.Fill(myDataSet);



On Executing it is giving me Following error
"Could not find installable ISAM."

I am using Excel2003 installed on Windows 2000.

Thanks in advance


Abhi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top