Connection String for Excel 2010?

Moataz Aahmed Mohammed picture Moataz Aahmed Mohammed · Apr 23, 2012 · Viewed 8k times · Source

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

Answer

Keith picture Keith · May 1, 2012

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";