Dear buddy, I am mad, can you help me and don't drop me as your sacrifice
Hi,
When I am trying to import data from excel to table it's giving me following error :-
An exception of type '
System.Data.OleDb.OleDbException' occurred in System.Data.dll but was not handled in user code
Additional information: External table is not in the expected format.
I am using following code:-
Collapse
OleDbConnection excelConn = new OleDbConnection();
excelConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + filelocation + "';Extended Properties=Excel 8.0");
excelConn.Open();
------解决方案--------------------
try{
}cacth{
}
print error!
------解决方案--------------------
http://support.microsoft.com/kb/825738/zh-cn
hope it can help you