using System.Data.OleDb;
string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Data\Sales.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES;""";
using (OleDbConnection conn = new OleDbConnection(connectionString))
conn.Open();
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", conn);
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
Console.WriteLine(reader[0].ToString());
reader.Close();
| Feature | 2007 Driver | ACE 2016 Driver | ODCB 17+ |
| :--- | :--- | :--- | :--- |
| xlsx > 1M rows | No | Yes | Yes |
| Windows 11 | Unstable | Supported | Supported |
| Office 365 Coexistence | Breaks | Works | N/A |
| Support for .xlsb | Partial | Full | Full |
ETL Processes
Reporting
Legacy Application Integration
2007 Office System Driver Data Connectivity Components Link [ Ad-Free ]
using System.Data.OleDb;
string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Data\Sales.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES;""";
using (OleDbConnection conn = new OleDbConnection(connectionString))
conn.Open();
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", conn);
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
Console.WriteLine(reader[0].ToString());
reader.Close();
| Feature | 2007 Driver | ACE 2016 Driver | ODCB 17+ |
| :--- | :--- | :--- | :--- |
| xlsx > 1M rows | No | Yes | Yes |
| Windows 11 | Unstable | Supported | Supported |
| Office 365 Coexistence | Breaks | Works | N/A |
| Support for .xlsb | Partial | Full | Full |
ETL Processes
Reporting
Legacy Application Integration