View Single Post
  #1 (permalink)  
Old January 17th, 2008, 04:01 AM
mayur.maverick mayur.maverick is offline
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in import data in IE

Hi,
I am developing code for importing data from Excel file.
here is the code
  string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/excelreading/") + "excel/" + strFilePath + ";Extended Properties='Excel 8.0;HDR=Yes'";
        DataSet dsExcel = new DataSet();

        using (OleDbConnection oleConn = new OleDbConnection(strConn))
        {
            string strCmd = "SELECT * FROM [Sheet1$A5:AZ500]";

            OleDbDataAdapter da = new OleDbDataAdapter(strCmd, oleConn);


            da.Fill(dsExcel);

        }

It works fine in Safari and Fire Fox.
but it gives error in IE7

error is like this
Failure creating file.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Failure creating file.

Source Error:


Line 68:
Line 69:
Line 70: da.Fill(dsExcel);
Line 71:
Line 72: }



..............................................