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.

Previous Next

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

 Install-Package ClosedXML

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.