Others

How to Fix Access Database Engine 2016 255-Column Limit in Excel

Tauseeq MagsiTauseeq Magsi Oct 22, 2026 868 views

Question details

The user needs to read more than 255 columns from an Excel file programmatically using C# and Microsoft Access Database Engine 2016, but is hitting a hard limitation.

How to Fix Access Database Engine 2016 255-Column Limit in Excel
Product
Microsoft Access Database Engine 2016
Device & OS
not provided
Scenario
Reading a large Excel dataset programmatically via OleDbDataReader in a C# application.
Observed behavior
The query returns only 255 columns from the Excel range, dropping any columns beyond the 255th.
Before you start

Ensure you have the exact column names or indices you need to query, and back up your original Excel dataset before running segmented programmatic queries.

Solution 1Recommended

Split the Excel Range into Multiple Queries

Bypass the hard 255-column limit by executing multiple queries, each fetching a specific subset of columns, and combining them in your application.

Microsoft Access Database Engine 2016 has an inherent limitation where a single SELECT statement can only retrieve a maximum of 255 columns. Using 'SELECT *' on wider sheets will silently truncate the remaining columns.

1
Define Column Ranges

Instead of using 'SELECT *', specify distinct column ranges in your SQL queries. For example, query columns 1 to 250 in the first query, and 251 to 500 in the second.

2
Update OLEDB Command

Adjust your OleDbCommand text to target the specific ranges, such as 'SELECT * FROM [Sheet1$A:IQ]' for the first batch.

3
Merge Data in C#

Execute the OleDbDataReader for each query and programmatically merge the DataTables or objects in your C# application based on a common key or row index.

Split the Excel Range into Multiple Queries
Avoid SELECT *: Never rely on 'SELECT *' when working with large Excel spreadsheets in OLEDB, as it provides no control over the truncated columns.
Free Microsoft Office alternative

Manage Large Datasets Effortlessly with WPS Office

While Microsoft Access Database Engine restricts your programmatic data queries to 255 columns, you may need a reliable, high-performance spreadsheet tool to actually view, edit, and organize these massive datasets. WPS Office is a lightweight, fully compatible alternative that easily handles huge spreadsheets without breaking a sweat.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installer for your operating system.
  2. 2. Install the Application: Run the downloaded installer and follow the on-screen instructions to set up WPS Office on your device.
  3. 3. Open Large Excel Files: Launch WPS Spreadsheet, go to 'Menu' > 'Open', and select your wide dataset to view all columns seamlessly.
Seamless compatibility with Microsoft Excel formats (.xlsx, .xls, .csv).Easily view, edit, and manage spreadsheets with up to 16,384 columns natively.Lightweight software footprint that doesn't bloat your system.Free to download and use with a highly familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does OleDbDataReader drop columns after 255?

This is a legacy limitation inherent to the Microsoft Access Database Engine (OLEDB provider), originally stemming from older Excel and Access formats (.xls, .mdb) that only supported up to 255 columns natively.

Does upgrading to a newer Access Database Engine fix the 255-column limit?

No, even the newer Microsoft Access Database Engine 2016 distributable retains this 255-column architectural limit for a single SELECT query.

How many columns can an Excel file actually hold?

Modern Excel files (.xlsx) can hold up to 16,384 columns. You need a more robust reading method, like third-party libraries or split queries, to retrieve all of them programmatically.