문제

I am using OLEDB to connect to Excel 2010. What is the required connection string for this operation?

도움이 되었습니까?

해결책

From here:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";

or

OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";

다른 팁

That connecting string you posted is for 2003 or older. Jet will not support 2007 or forward.

Try this instead:

 Provider = Microsoft.ACE.OLEDB.12.0;
 Data Source = c:\myFolder\myExcel2007file.xlsx;
 Extended Properties = "Excel 12.0 Xml;HDR ="YES";

Or try http://www.connectionstrings.com/excel-2010/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top