Microsoft Access Database Engine

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

For advanced scenarios requiring both bitnesses on the same machine (e.g., a development workstation), you must install the 64-bit ACE first, then the 32-bit ACE using the switch, or use the "ACE Redistributable for Microsoft Office" specific version. microsoft access database engine

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myDb.mdb; Provider=Microsoft

using System.Data.OleDb;

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Data\MyDatabase.accdb;Persist Security Info=False; Extended Properties="Excel 12.0 Xml

To connect to Excel, text, or dBase, your extended properties must be precise. For Excel 2007+: