ExpertXls Excel Spreadsheets Library for .NET |
ExpertXls Excel Library for .NET creates, edits and reads Excel workbooks in the Excel 97-2003 (.xls) and Excel 2007 or later (.xlsx) formats. It is a single strong named assembly, expertxls.dll, that you reference in any .NET application: ASP.NET, Windows Forms, WPF, console applications, Windows services. Microsoft Excel does not have to be installed and no third party software is used.
With the library you can create workbooks with styled cells, formulas and array formulas, 2D and 3D charts, pictures, hyperlinks, comments, data validation and conditional formatting, Excel tables, AutoFilters and sparklines, sort ranges, find and replace text, import data from CSV files and .NET DataTable objects, set the page setup for printing and protect workbooks and worksheets.
Create new workbooks or edit existing workbooks; open and save files, streams and byte arrays
Excel 97-2003 (.xls) and Excel 2007 or later (.xlsx) formats
Cells and ranges in A1 notation or by row and column index, named ranges, merged cells
Text, number, date and boolean values with Excel number formats
Named workbook styles; solid, pattern and gradient fills, fonts, borders, alignment and text rotation
Formulas and array formulas in A1 and R1C1 notation, calculated by the library on request
2D and 3D charts in worksheets and chart worksheets, with generated or custom series
Pictures, hyperlinks to web pages, e-mail addresses and workbook ranges, cell comments
Data validation: lists, whole and decimal numbers, dates, text length
Conditional formatting: cell value and formula rules, color scales, data bars, icon sets; sparklines
Excel tables with built-in styles and a totals row, AutoFilters, sorting by several columns
Find and replace in a range, a worksheet or the whole workbook
Import from CSV and export to CSV, load from and get to System.Data.DataTable objects
Page setup: paper size, orientation, margins, headers and footers with pictures
Workbook and worksheet protection, password to open Excel 97-2003 workbooks
Create a workbook, write a value and save the workbook to a file:
using ExpertXls.ExcelLib; // create a workbook in the Excel 2007 or later format, with one worksheet ExcelWorkbook workbook = new ExcelWorkbook(ExcelWorkbookFormat.Xlsx_2007); // workbook.LicenseKey = "your license key"; ExcelWorksheet worksheet = workbook.Worksheets[0]; worksheet.Name = "Hello"; worksheet["A1"].Value = "Hello from ExpertXls"; worksheet["A2"].Value = DateTime.Now; worksheet["A2"].Style.Number.NumberFormatString = "yyyy-mm-dd hh:mm"; workbook.Save("hello.xlsx"); workbook.Close();
The Code Sample topic shows a complete workbook with styles, pictures, a chart and hyperlinks.
Version 10.0 is part of the ExpertPdf 22.0 release. It requires a version 10 license key.
Conditional formatting: cell value and formula rules, color scales, data bars and icon sets, in the .xls and .xlsx formats.
Sort and filter: sort a range by one or more columns; AutoFilter with filters by values and by conditions on the columns.
Excel tables with a built-in style, filter buttons and a totals row (.xlsx).
Find and replace in a range, a worksheet or the whole workbook, matching the case or the entire cell content.
Sparklines: line, column and win/loss charts in cells (.xlsx).
The samples were rewritten: .NET Framework 4.6.2 projects in the Samples folder and .NET 10 / .NET 11 projects (Windows Forms, console, Blazor) in the Samples_NET_10 folder, in C# and VB.NET. A new sample shows workbook and worksheet protection.