Open Source .NET Library for Manipulating Excel Spreadsheets
ClosedXML allows you to read, manipulate and write Microsoft Excel Documents
ClosedXML is an open source C# API for reading, manipulating and writing Microsoft Excel 2007+ (.xlsx, .xlsm) documnents. The API allows you to create Excel files without using the Excel application, and read files using the enhanced features.
Using the API you can style your workbooks by using background coloring and cell bordering. You can add, remove and move your worksheets and manage datatypes inside Excel.
At A Glance
An overview of ClosedXML features.
- Read Excel
- Write Excel
- Background Coloring
- Cell Border
- Add Worksheets
- Remove Worksheets
- Move Worksheets
- Manage Datatypes
ClosedXML runs on .NET 4.0 and .NET 4.6
Getting Started with ClosedXML
The recommended way to install ClosedXML is from Nuget, Please use the following command for fasters installation.
Install ClosedXML from NuGet
Create New Workbooks for Free using C#
CLosedXML allows C# .NET developers to create new Excel worksheets. You can create a blank workbook using the XLWorkbook() method. You can add worksheets in your workbook and add cells and columns in it.
Style Excel Sheets using C#
The API also allows styling your Excel sheets. The API is enriched with styling features including aligment, border, fill, font, number format, styling rows and columns more.
Using Auto Filters in Excel using C#
ClosedXML also allows using filters inside your Excel worksheets. You can apply filter to a specific range, apply filter to values and create your own custom filters as well.