ClosedXML 0.95.0

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.

There is a newer version of this package available.
See the version list below for details.
Install-Package ClosedXML -Version 0.95.0
dotnet add package ClosedXML --version 0.95.0
<PackageReference Include="ClosedXML" Version="0.95.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ClosedXML --version 0.95.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Breaking changes

  • Range strings, e.g. A1:B2 are now always treated as absolute, i.e. relative to A1 instead of relative to the top left cell of a given range.
  • IXLSheetProtection has been totally refactored and now uses a flag based enum to control the elements that are allowed or locked.
  • Removed IXLSheetProtection.IsProtected setter
  • XLClearOptions and XLCellUsedOptions 's flags are now aligned
  • IXLDataValidation.Ranges made readonly
  • To add or remove ranges from the data validation rule the user must use dedicated methods (AddRange, AddRanges, ClearRanges, RemoveRange)
  • A single data validation rule cannot apply to ranges from different worksheets (it was a bug that this was possible)

Pull requests merged since 0.95.0-beta2

Bug fixes

#1063 Copy comment style correctly when shifting ranges
#1108 Correctly save empty cell with quote prefix (do not treat as empty)
#1125 Change cached value type when data type changes
#1132 <c> elements with missing r attribute: XLAddress constructor had parameters swapped
#1133 Enumerate ranges in a deterministic order
#1134 Correctly propagate worksheet style to cells from a worksheet
#1135 Correctly load column-wide styles
#1137 Fix changing inner borders of the range
#1150 Correctly clear inline string when required
#1153 Correctly throw DivisionByZeroException when denominator is zero.
#1155 Ignore _X (capital X) as XML escaping char
#1161 Avoid creation of new item in Internals.RowsCollection when adding comment
#1168 Fix initialization of default styles for XLCells, XLRows, XLColumns and XLRanges
#1172 Clear all RelId's if workbook is loaded from template.
#1178 Fixes in GetHashCode functions (1073)
#1196 Fix error by two pivot with one source #1195
#1223 Fix pivot subtotals loading
#1227 Refactor comments
#1234 Merged ranges cell values should not be set, except for top left cell of merged range
#1245 Fix the issue with conditional formats created in non-US culture (#1187)
#1247 Fix issues related to cells inserting (1236)
#1266 Fix CONCATENATE for cell references
#1282 Treat missing numberFormatId as General numberformat
#1289 Remove unused code and fix ATAN2 tests
#1292 Redefine rules for sheet name escaping (#1287)
#1307 Fix null exception when saving a file
#1316 Fix exception when loading rows with no row index populated (#1314)
#1323 #651: fix loading with deleted worksheets.
#1351 Fix null DateTime in XLCell.InsertDataInternal with IEnumerable
#1356 Fix a regular expression used for extracting A1 references
#1359 Fixed the Expression double conversion operator to handle string values
#1362 Set longText attribute for string items in pivot table
#1369 Fix issues with loading comments (#1244)
#1384 When saving, mark the first selected tab as active if no active tabs exist (#1383)
#1386 Set the first sheet active and visible on loading if no active tab is specified in file (#1383)

Enhancments

#1015 Feature/#1010 text join func
#1038 IXLSheetProtection refactoring
#1054 Implement workbook FileSharing and a few of the properties
#1058 Dont recalculate formula cached values after load
#1077 Refactor digit and letter parsing to allow Unicode characters
#1109 Don't automatically adjust columns width to contents when inserting datatable. Some users want to opt out because of PlatformNotSupportedException
#1122 Add helper methods to add worksheet with default sheet name
#1129 Alternative implementation of pivot table formats
#1130 Enhance TRUNC function for additional parameter
#1136 Implement NUMBERVALUE function
#1151 Performance improvement to delete entire columns
#1158 Check that print titles are valid row ranges or column ranges
#1166 Ignore default Excel function namespace and implement CONCAT function
#1169 Avoid creating new XLCell instances during range shifting
#1170 Remove IXLSheetProtection.IsProtected public setter
#1174 Correctly dispose temporary memorystream
#1175 Sparklines implementation
#1183 Improve Merge operation performance
#1194 Fix for issue 1192
#1205 Improve performance of worksheet copying (1188)
#1208 optional range consolidation via save options
#1219 Implement MATCH and INDEX functions
#1224 Improve performance of loading workbooks having many merged ranges (#1220)
#1227 Refactor comments
#1232 Set versioning number to allow enhanced pivot table features
#1237 Improve HLOOKUP and VLOOKUP performance
#1240 Prevent copying of deleted worksheets.
#1253 Replace licenseUrl (deprecated) with license tag
#1278 Clear CellsCollection on WorksheetInternals disposal (#1276)
#1284 Improvements for workbook saving (#1280)
#1293 Remove the unnecessary check for VML elements not existing (#1285)
#1326 Issue 1325: PopulateAutoFilter range check
#1353 Implement % operator and correctly parse expressions with multiple unary operators (--, ++)
#1357 Replace String.Compare with TryGetValue
#1364 Fix issues occurred when running tests on .Net Core 3.0
#1368 Clear inlined rich text data on saving (#1361)
#1376 CEILING and FLOOR fixes
#1379 Explicitly set document type on saving (#1375)
#1381 Exclude dependent SUBTOTAL formulas in SUBTOTAL evaluation
#1388 Remove the dependency on FastMember. Improve performance of InsertData (#797)
#1391 Replace ContainsKey with TryGetValue

Breaking changes

  • Range strings, e.g. A1:B2 are now always treated as absolute, i.e. relative to A1 instead of relative to the top left cell of a given range.
  • IXLSheetProtection has been totally refactored and now uses a flag based enum to control the elements that are allowed or locked.
  • Removed IXLSheetProtection.IsProtected setter
  • XLClearOptions and XLCellUsedOptions 's flags are now aligned
  • IXLDataValidation.Ranges made readonly
  • To add or remove ranges from the data validation rule the user must use dedicated methods (AddRange, AddRanges, ClearRanges, RemoveRange)
  • A single data validation rule cannot apply to ranges from different worksheets (it was a bug that this was possible)

Pull requests merged since 0.95.0-beta2

Bug fixes

#1063 Copy comment style correctly when shifting ranges
#1108 Correctly save empty cell with quote prefix (do not treat as empty)
#1125 Change cached value type when data type changes
#1132 <c> elements with missing r attribute: XLAddress constructor had parameters swapped
#1133 Enumerate ranges in a deterministic order
#1134 Correctly propagate worksheet style to cells from a worksheet
#1135 Correctly load column-wide styles
#1137 Fix changing inner borders of the range
#1150 Correctly clear inline string when required
#1153 Correctly throw DivisionByZeroException when denominator is zero.
#1155 Ignore _X (capital X) as XML escaping char
#1161 Avoid creation of new item in Internals.RowsCollection when adding comment
#1168 Fix initialization of default styles for XLCells, XLRows, XLColumns and XLRanges
#1172 Clear all RelId's if workbook is loaded from template.
#1178 Fixes in GetHashCode functions (1073)
#1196 Fix error by two pivot with one source #1195
#1223 Fix pivot subtotals loading
#1227 Refactor comments
#1234 Merged ranges cell values should not be set, except for top left cell of merged range
#1245 Fix the issue with conditional formats created in non-US culture (#1187)
#1247 Fix issues related to cells inserting (1236)
#1266 Fix CONCATENATE for cell references
#1282 Treat missing numberFormatId as General numberformat
#1289 Remove unused code and fix ATAN2 tests
#1292 Redefine rules for sheet name escaping (#1287)
#1307 Fix null exception when saving a file
#1316 Fix exception when loading rows with no row index populated (#1314)
#1323 #651: fix loading with deleted worksheets.
#1351 Fix null DateTime in XLCell.InsertDataInternal with IEnumerable
#1356 Fix a regular expression used for extracting A1 references
#1359 Fixed the Expression double conversion operator to handle string values
#1362 Set longText attribute for string items in pivot table
#1369 Fix issues with loading comments (#1244)
#1384 When saving, mark the first selected tab as active if no active tabs exist (#1383)
#1386 Set the first sheet active and visible on loading if no active tab is specified in file (#1383)

Enhancments

#1015 Feature/#1010 text join func
#1038 IXLSheetProtection refactoring
#1054 Implement workbook FileSharing and a few of the properties
#1058 Dont recalculate formula cached values after load
#1077 Refactor digit and letter parsing to allow Unicode characters
#1109 Don't automatically adjust columns width to contents when inserting datatable. Some users want to opt out because of PlatformNotSupportedException
#1122 Add helper methods to add worksheet with default sheet name
#1129 Alternative implementation of pivot table formats
#1130 Enhance TRUNC function for additional parameter
#1136 Implement NUMBERVALUE function
#1151 Performance improvement to delete entire columns
#1158 Check that print titles are valid row ranges or column ranges
#1166 Ignore default Excel function namespace and implement CONCAT function
#1169 Avoid creating new XLCell instances during range shifting
#1170 Remove IXLSheetProtection.IsProtected public setter
#1174 Correctly dispose temporary memorystream
#1175 Sparklines implementation
#1183 Improve Merge operation performance
#1194 Fix for issue 1192
#1205 Improve performance of worksheet copying (1188)
#1208 optional range consolidation via save options
#1219 Implement MATCH and INDEX functions
#1224 Improve performance of loading workbooks having many merged ranges (#1220)
#1227 Refactor comments
#1232 Set versioning number to allow enhanced pivot table features
#1237 Improve HLOOKUP and VLOOKUP performance
#1240 Prevent copying of deleted worksheets.
#1253 Replace licenseUrl (deprecated) with license tag
#1278 Clear CellsCollection on WorksheetInternals disposal (#1276)
#1284 Improvements for workbook saving (#1280)
#1293 Remove the unnecessary check for VML elements not existing (#1285)
#1326 Issue 1325: PopulateAutoFilter range check
#1353 Implement % operator and correctly parse expressions with multiple unary operators (--, ++)
#1357 Replace String.Compare with TryGetValue
#1364 Fix issues occurred when running tests on .Net Core 3.0
#1368 Clear inlined rich text data on saving (#1361)
#1376 CEILING and FLOOR fixes
#1379 Explicitly set document type on saving (#1375)
#1381 Exclude dependent SUBTOTAL formulas in SUBTOTAL evaluation
#1388 Remove the dependency on FastMember. Improve performance of InsertData (#797)
#1391 Replace ContainsKey with TryGetValue

Release Notes

See https://github.com/ClosedXML/ClosedXML/releases/tag/0.95.0

NuGet packages (102)

Showing the top 5 NuGet packages that depend on ClosedXML:

Package Downloads
CsvHelper.Excel
An implementation of ICsvParser and ICsvSerializer from CsvHelper that reads and writes using the ClosedXml library.
Ewl
The Enterprise Web Library (EWL), and its tailored infrastructure platform, are a complete and open solution for developing and operating web-based enterprise software.
DoddleReport.OpenXml
Adds OpenXML support to DoddleReport. The currently supported format is Excel and is more robust than the default ExcelReportWriter in DoddleReport.
ClosedXML.Extensions.Mvc
MVC extensions for ClosedXML
ClosedXML.Report
ClosedXML.Report is a tool for report generation and data analysis in .NET applications through the use of Microsoft Excel. ClosedXML.Report is a .NET-library for report generation Microsoft Excel without requiring Excel to be installed on the machine that's running the code.

GitHub repositories (6)

Showing the top 5 popular GitHub repositories that depend on ClosedXML:

Repository Stars
open-rpa/openrpa
Free Open Source Enterprise Grade RPA
Implem/Implem.Pleasanter
Pleasanter | Business application platform
ClosedXML/ClosedXML.Report
ClosedXML.Report is a tool for report generation with which you can easily export any data from your .NET classes to Excel using a XLSX-template.
nhmkdev/cardmaker
An application that generates graphics via data sources.
matthidinger/DoddleReport
Generate custom reports (PDF, Excel, etc) from any IEnumerable datasource.

Version History

Version Downloads Last updated
0.95.3 489,841 5/25/2020
0.95.2 123,649 4/26/2020
0.95.1 10,410 4/23/2020
0.95.0 39,131 4/15/2020
0.95.0-beta2 42,118 8/21/2019
0.95.0-beta1 18,083 4/4/2019
0.94.2 2,115,107 12/18/2018
0.94.0 27,548 12/12/2018
0.94.0-rc2 3,763 11/29/2018
0.94.0-rc1 4,728 11/11/2018
0.93.1 480,368 8/7/2018
0.93.0 163,752 6/25/2018
0.93.0-rc3 6,421 6/7/2018
0.93.0-rc2 2,163 5/31/2018
0.93.0-beta4 3,155 5/14/2018
0.93.0-beta2 3,450 4/26/2018
0.93.0-beta1 1,528 4/19/2018
0.92.1 296,403 4/10/2018
0.92.0-beta1 3,417 3/22/2018
0.91.1 21,808 4/4/2018
0.91.0 165,235 1/31/2018
0.91.0-beta3 1,774 1/23/2018
0.91.0-beta2 10,281 12/8/2017
0.91.0-beta1 1,583 11/29/2017
0.90.0 363,976 10/23/2017
0.90.0-beta2 1,888 10/6/2017
0.89.0 222,407 9/12/2017
0.89.0-beta1 3,075 8/23/2017
0.88.0 108,851 7/24/2017
0.88.0-beta1 2,418 7/10/2017
0.87.1 508,482 4/3/2017
0.86.0 204,086 1/6/2017
0.85.0 125,849 12/7/2016
0.80.1 218,605 9/15/2016
0.76.0 929,535 12/16/2014
0.75.0 93,489 9/17/2014
0.74.0 26,342 8/10/2014
0.73.0 27,499 6/24/2014
0.72.3 9,251 6/4/2014
0.72.2 1,514 6/4/2014
0.72.1 23,185 6/4/2014
0.72.0 3,788 6/4/2014
0.71.1 9,170 5/26/2014
0.70.0 4,776 5/18/2014
0.69.2 99,712 10/3/2013
0.69.1 21,982 8/15/2013
0.69.0 2,859 8/10/2013
0.68.1 51,099 10/20/2012
0.68.0 2,112 10/12/2012
0.67.2 11,542 8/14/2012
0.67.1 1,566 8/13/2012
0.67.0 1,585 8/12/2012
0.66.1 2,203 7/28/2012
0.66.0 1,785 7/18/2012
0.65.2 4,015 4/21/2012
0.64.0 4,317 2/4/2012