Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai I facing a problem for excel connection string. when i am testing in my system data is inserting into excel but when i hosted in server and started inserting data then it is saying "EXTERNAL TABLE IS NOT IN A CORRECT FORMAT" i know that it is a issue with the connection but i am unable to solve the issue. Below is the connection which i used

C#
string path = Server.MapPath("~/admin/InsertDataExcel.xlsx");

String conecion = "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties='Excel 12.0 Xml;ReadOnly=False;HDR=YES'";
Posted
Updated 28-Apr-15 18:20pm
v2
Comments
Maciej Los 29-Apr-15 1:27am    
Did you install MS Access Database Engine on server?

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