错误外部表格不是预期的格式
我试图从我的C#
窗口应用程序,从sheet1.xls文件通过oledb连接在visual studio-2008中的数据到sqlserver2005
,我正在使用Windows7操作系统,我没有安装我的系统上的Excel。
这是我的连接string:
string excelconnectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +excelfilepath + ";"+"Extended Properties='Excel 8.0;HDR=Yes;'";
我尝试了很多方法,但我仍然得到这个错误:
"External table is not in the expected format. "
请帮帮我。
对于excel文件使用Microsoft.ACE.OLEDB.12.0
string excelconnectionstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +excelfilepath + ";"+"Extended Properties="Excel 12.0;HDR=Yes";
的ConnectionStrings