Lightweight C# reader for Excel and CSV files from version 2.0 through current formats, with optional DataSet conversion.
Overview
ExcelDataReader is a C# library for reading Microsoft Excel workbooks and related formats without requiring Excel installed. It supports .xlsx, .xlsb, legacy .xls BIFF versions, SpreadsheetML .xml, and plain .csv, and can auto-detect format when opening a stream.
The core API exposes IExcelDataReader for row-by-row navigation across sheets, typed getters, merge metadata, column widths, number formats, document properties, legacy cell comments, and explicit hyperlinks. A companion ExcelDataReader.DataSet package adds AsDataSet() to populate System.Data.DataSet structures for higher-level consumption.
CSV reading uses a dedicated factory with delimiter autodetection, encoding options, and optional limits on how many initial rows are analyzed for dimensions. Configuration covers password-protected workbooks, fallback encodings, and spilling large shared string tables to disk to reduce memory use on big XLSX or XLSB files.
Packages target .NET Framework, .NET Standard, and modern .NET per the project install notes. Formatting of displayed values is left to callers, with guidance to pair number format strings with the separate ExcelNumberFormat library when needed.
Key features
- XLSX XLSB XLS and XML support
- Row-by-row IExcelDataReader API
- Optional DataSet conversion package
- CSV reader with delimiter detection
- Document properties and hyperlinks
- Merge cells and column width metadata
- Shared string spill-to-disk option
- Password-protected workbook support
Use cases
- Importing Excel files in .NET applications
- Streaming large spreadsheets row by row
- Loading CSV into typed datasets
- Reading workbook metadata and links