The ClosedXML package will allow developers to create OpenXML files for Excel 2007. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It's developed in C# but can be used by any other .NET language.
ClosedXML allows you to create Excel 2007/2010 files without the Excel application. If you 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("Sample.xlsx");
- var worksheet = workbook.Worksheets.Add("Sample Sheet");
- worksheet.Cell("A1").Value = "Hello World!";
- workbook.Save();
· Can create new workbooks
· Add worksheets
· Access cells using R1C1, A1, and mixed notations.
· Add text, dates, booleans, and numbers to cells
· Select ranges (not named ranges though)
· Format cells/ranges
· Alignments
· Borders
· Fills
· Fonts
· Numeric/Date formats
· Traverse a range's columns and rows
Requirements:
· .NET Framework 4.0
What's New in This Release:
· Improved performance
· Dramatically reduced memory consumption
· Strongly signed the assembly
· Fixed issue when collapsing columns
· IXLWorksheet/IXLRow/IXLColumn .Cells() now return the cells used instead of all cells in the worksheet/row/column
· Removed .ClearStyles, use .Clear(XLClearOptions.Formats) instead
· worksheet.Cell/Cells/Range/Ranges now accept named ranges as parameters.
· Added the following methods to the workbooks so you can easily reference named ranges with a workbook scope: workbook.Cell/Cells/Range/Ranges
· Removed property namedRange.Range. Use namedRange.First() instead or better yet use ws/wb.Range("NamedRange") instead.
· Fixed issues 7076, 7065, 7064, 7026, 7071