Here i am attatching the source code and the excel file. When i use this code it generates the error , "The external table is not in correct format'.
Code:
private string StrConn = "";
OleDbDataAdapter da;
DataSet ds = new DataSet();
StrConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\"";
da = new OleDbDataAdapter("SELECT [Response Code], [Transaction ID] FROM [Download20080831-112615$]", StrConn);
da.Fill(ds);
}
If you want to test i have also attatched the excel file in zip filder that i am using
One thing however this working to read any other excel file.
Please if someone has any idea help me.
Last edited by peter_budo; Sep 2nd, 2008 at 7:32 am. Reason: Keep It Organized - please use [code] tags
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
Offline 59 posts
since Mar 2007