I received this error after I have deployed my application in the server (win 2003) but in my development pc it is working.
I can upload even the excel files is more than 30MB in file size.Code:External table is not in the expected format.
Printable View
I received this error after I have deployed my application in the server (win 2003) but in my development pc it is working.
I can upload even the excel files is more than 30MB in file size.Code:External table is not in the expected format.
Hello there,
You are going to have to give us a clue here, as it is not clear from what you have described, what your problem is.
Are you saying that you have a FileUpload control, that is uploading an Excel file to the server, and then you are parsing through that Excel file, and trying to import the data into an SQL Server?
Can you show us the code that you are using? Specifically, the line that is throwing the error?
Gary
Yeah, that's right. Your assumptions is correct, that's what I am trying to do.
It doesn't throw any error or exceptions, because it is working fine in my development pc. Only the problem is, when I deploy it in the server (windows 2003) that's the problem I have received.
Actually I received that kind of error in my development pc,
the workaround I have done is to insall AccessDatabaseEngine from Microsoft. After installing it, it works. But, the same code I deployed in the server, and also installed AccessDatabaseEngine in the server, this error still appears:Code:External table is not in the expected format.
Code:External table is not in the expected format.
Code:string sConnectionString1 = "Data Source=" + location + ";" + "Provider=Microsoft.ACE.OLEDB.12.0; Extended Properties=Excel 12.0;";
OleDbConnection objConn = new OleDbConnection(sConnectionString1);
objConn.Open();
OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [Data$]", objConn);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
objAdapter1.SelectCommand = objCmdSelect;
DataSet objDataSet1 = new DataSet();
objAdapter1.Fill(objDataSet1, "SheetData");
DataTable dt = objDataSet1.Tables[0];
This works fine in the development pc but after deploying it in the production it doesn't work anymore. Please help. I can't find any solutions in google.
Hello,
This has to be something that is different between the two setups, your local one, and the production server. It would be good if you could instrument (i.e. adding logging to your application) your application to find out exactly where the code is breaking.
Are you aware of any other changes you had to make on your local machine.
Gary
I can't figure out what's in my local machine that our server don't have. I'm too tired fixing this problem, I can't find any solutions anywhere.
Hey,
The first part of the solution, as I have mentioned is to figure out what is different in the setups between the two servers. Only you can do this, and you won't find any help on the internet for this.
Secondly, you need to find out at exactly which point the code is breaking. The only way to do this on the server is with logging. I would highly recommend that you add logging to your application, and start looking at exactly which point the exception is thrown, this will help you narrow down the problem.
Gary