Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am trying to export EXCEL file using
Response.ContentType = "application/";

But when i import same file to system using oledb it throws an error which reads.

External table is not in the expected
format.System.Data.OleDb.OleDbException: External table is not in the
expected format. at System.Data.OleDb.OleDbConnection.ProcessResults(Int32
hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at

How to solve this ?
any help ?
Updated 20-Jun-11 0:24am

I am not very sure, but you may try with putting the columns names in excel sheet as same as that of the Grid from which you are exporting. I think I had encountered the same error sometime back and solved it the same way.
Share this answer
Hope C# class library for exporting data to CSV/Excel file[^]an article from CP might help you.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900