Excel Data Reader Benchmarks

May 5, 2026 ยท View on GitHub

These benchmarks measure reading a 65k row (max .xls row count) Excel file, and accessing each cell value as the type expected by the SalesRecord class.

SylvanXlsx_BindT is the only benchmark in the group that actually creates and binds to SalesRecord instances, the other benchmarks only produce the required values.

These benchmarks are written to be as fair as possible. One requirement is that the monetary values must be a decimal with two digit precision. Many librarys will produce decimal values with incorrect precision without custom handling. Specifically, the values must be accessed as a double, then cast to a decimal, which will produce the expected precision. Many libraries provide decimal accessors that are a "pit of failure" in this regard. See benchmark implementations for full details.

OpenXml is no longer included in these results. It is so difficult to use that I cannot figure out how to write a correct and fair benchmark for it. Since ClosedXml is a wrapper around OpenXml, one would assume that they'd have similar performance.

Excel .xlsx Benchmarks

The Baseline in this group, measure the time taken to unzip the Sheet1.xml and using XmlReader.Read to process every node. It represents the minimal work that must be done assuming those classes are used for processing. AceOleDbXlsx is approximate, as I don't run it every time, for "reasons".

MethodMeanErrorRatioAllocatedAlloc Ratio
Baseline111.6 ms0.39 ms1.00246.69 KB1.00
SylvanXlsx162.5 ms0.71 ms1.46665.76 KB2.70
SylvanXlsx_BindT164.2 ms0.71 ms1.4710906.27 KB44.21
SylvanXlsxDynamic169.8 ms0.77 ms1.5214474.27 KB58.67
XlsxHelperXlsx201.6 ms0.77 ms1.8193306.11 KB378.24
PrimeXlsx207.4 ms0.87 ms1.8682980.75 KB336.38
HypeLabXlsx_SheetData243.8 ms3.26 ms2.1885186.37 KB345.32
AsposeXlsx306.7 ms5.82 ms2.75209868.38 KB850.75
Lightweight407.5 ms5.31 ms3.65167951.37 KB680.83
MiniExcelXlsx410.8 ms3.37 ms3.68648458.83 KB2,628.67
ExcelDataReaderXlsx438.6 ms1.34 ms3.93267930.68 KB1,086.11
EPPlusXlsx698.4 ms5.88 ms6.26570350.74 KB2,312.04
AceOleDbXlsx707.6 ms6.08 ms~6.4227035.35 KB~109.56
ClosedXmlXlsx1,063.9 ms5.69 ms9.53727577.53 KB2,949.39
FastExcelXlsx1,217.4 ms20.99 ms10.901189983.26 KB4,823.85
NpoiXlsx1,564.0 ms17.51 ms14.011003667.2 KB4,068.58

Sum

This benchmark measures summing the values of a single column (Total Profit) from the Excel file. It is meant to highlight an optimization employed by some libraries where you only "pay" for the columns that you access.

MethodMeanErrorStdDevRatioRatioSDGen0Gen1AllocatedAlloc Ratio
Baseline110.9 ms0.51 ms0.43 ms1.000.01--246.69 KB1.00
SylvanData135.8 ms0.51 ms0.48 ms1.220.01--649.47 KB2.63
XlsxHelperXlsx186.7 ms0.99 ms0.87 ms1.680.011666.6667333.333393305.33 KB378.23
Prime199.8 ms0.42 ms0.37 ms1.800.011666.6667333.333382981.29 KB336.38
ExcelDataReaderXls436.0 ms2.20 ms2.05 ms3.930.025000.0000-267929.37 KB1,086.11

Excel .xlsb Benchmarks

MethodMeanErrorRatioAllocatedAlloc Ratio
SylvanXlsb24.85 ms0.129 ms1.00359.02 KB1.00
PrimeXlsb62.40 ms0.228 ms2.51142740.12 KB397.58
ExcelDataReaderXlsb135.19 ms0.623 ms5.44150655.52 KB419.63
AsposeXlsb225.41 ms3.271 ms9.07247963.99 KB690.66
AceOleDbXlsb3,430.11 ms9.214 ms138.0213212.17 KB36.80

Excel .xls Benchmarks

MethodMeanErrorRatioAllocatedAlloc Ratio
SylvanXls16.31 ms0.058 ms1.00190.41 KB1.00
ExcelDataReaderXls110.48 ms1.679 ms6.78237569.16 KB1,247.66
AceOleDbXls205.85 ms0.968 ms12.6227033.59 KB141.97
AsposeXls212.78 ms4.149 ms13.05252010.76 KB1,323.50
NpoiXls557.45 ms11.082 ms34.19657427.16 KB3,452.65