https://github.com/ClosedXML/ClosedXML

@Francois Botha Francois Botha authored on 22 Sep 2017
.github Update ISSUE_TEMPLATE.md 8 years ago
ClosedXML Merge branch 'develop' of https://github.com/ClosedXML/ClosedXML into netstandard2 8 years ago
ClosedXML_Examples Merge branch 'develop' of https://github.com/ClosedXML/ClosedXML into netstandard2 8 years ago
ClosedXML_Sandbox Add .editorconfig files back in projects 8 years ago
ClosedXML_Tests Merge branch 'develop' of https://github.com/ClosedXML/ClosedXML into netstandard2 8 years ago
.editorconfig Move .editconfig file after directory structure change. 9 years ago
.gitattributes Ensure .csproj files end with CRLF 8 years ago
.gitignore Ignore .vs folder 8 years ago
CONTRIBUTING.md Merge branch 'develop' of https://github.com/closedxml/closedxml into remove-integer-to-string-cache 8 years ago
ClosedXML.sln Implement .NET standard as far as possible. 8 years ago
ClosedXML.vsmdi Project hierarchy cleanup 9 years ago
LICENSE Initial commit 9 years ago
README.md Add editorconfig instructions 8 years ago
appveyor.yml Add support for .NET 3.5 8 years ago
README.md

ClosedXML

Build status

ClosedXML makes it easier for developers to create Excel 2007+ (.xlsx, .xlsm, etc) files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and Visual Basic (VB).

For more information see the wiki

Install ClosedXML via NuGet

If you want to include ClosedXML in your project, you can install it directly from NuGet

To install ClosedXML, run the following command in the Package Manager Console

PM> Install-Package ClosedXML

What can you do with this?

ClosedXML allows you to create Excel 2007+ (.xlsx, .xlsm, etc) files without the Excel application. The typical example is creating Excel reports on a web server.

If you've ever used the Microsoft Open XML Format SDK you know just how much code you have to write to get the same results as the following 4 lines of code.

var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "Hello World!";
workbook.SaveAs("HelloWorld.xlsx");

Extensions

Be sure to check out our ClosedXML extension projects

Developer guidelines

Full guidelines to follow later

  • Please submit pull requests that are based on the develop branch.
  • Where possible, pull requests should include unit tests that cover as many uses cases as possible. This is especially relevant when implementing Excel functions.
  • Install NUnit 3.0 Test Adapter if you want to run the test suite in Visual Studio.
  • We use 4 spaces for code indentation. This is the default in Visual Studio. Don't leave any trailing white space at the end of lines or files. To make this easier, ClosedXML has an editorconfig configuration file. It is recommended you install editorconfig from the Visual Studio Extension Manager.