Excel library v10.0.1

ExpertXLS Excel library for .NET

The ExpertXLS Excel Library for .NET can be linked into any type of .NET project, ASP.NET web sites, Windows Forms or WPF applications, to create new Excel documents from scratch or to edit existing ones, in the Excel 97-2003 (.xls) and Excel 2007 or above (.xlsx) formats.

The library is a .NET managed assembly and does not depend on Microsoft Office Excel. There is nothing to install: reference the strong named assembly from your project. ExpertXLS is also part of the ExpertComponents Toolkit Total.

NuGet · ExpertXls.ExcelLibrary C# & VB.NET samples included
Formats XLS · XLSX · CSV
Dependencies No Microsoft Excel
Targets .NET Framework to .NET 11

Everything ExpertXLS does.

Grouped by what they act on: the workbook and its data, the worksheet content, the formatting and page setup, and protection and deployment.

Workbooks & data

Create, edit, load and save.

New or existing Excel documents, in files or streams, with data from CSV files and .NET DataTables.

Create or edit Excel documents

Create new Excel documents from scratch, or open existing Excel documents and edit them.

.xls and .xlsx

Support for the Excel 97-2003 (.xls) and the Excel 2007 or above (.xlsx) formats.

Files and streams

Load a workbook from a stream or from a file, and save a workbook to a stream or to a file.

CSV

Load data from CSV files and save data to CSV format.

.NET DataTable

Load data from a .NET DataTable, or save data to a DataTable object.

Worksheet content

What goes in a worksheet.

Formulas, charts, images, hyperlinks, comments, named ranges and data validation.

Formulas and array formulas

Add formulas and array formulas to a worksheet.

Charts

Add chart shapes to a worksheet, or chart worksheets to a workbook.

Images

Add images to a worksheet.

Hyperlinks and comments

Add hyperlinks and comments to a worksheet.

Named ranges

Add named ranges at worksheet or at workbook level.

Data validation

Restrict what can be entered in the cells of a worksheet.

Conditional formatting

Cell value and formula rules, two and three color scales, data bars and icon sets, in .xls and .xlsx.

AutoFilter

Add filter buttons to a range and filter a column by values or conditions.

Excel tables

Create tables from ranges, with a built-in style, banded rows and a totals row (.xlsx).

Find, replace and sort

Find and replace text in a range, a worksheet or the whole workbook, and sort a range by one or more columns.

Sparklines

Line, column and win/loss sparklines in the cells of .xlsx documents.

Formatting & page setup

How the workbook looks and prints.

Styles, gradients and textures, page setup and workbook properties.

Global styles

Add global styles to a workbook and apply them to cells and ranges.

Gradients and textures

Advanced support for the Excel 2007 and above gradients and textures.

Page setup

Worksheet headers and footers, paper size, margins and orientation.

Workbook properties

Set the workbook author, subject, comments and the other document properties.

Protection & deployment

Who can change it, and where it runs.

Workbook and worksheet protection, and a single assembly with no installation.

Workbook protection

Protect the workbook windows and structure.

Worksheet protection

Protect the data of a worksheet.

Passwords for .xls

Read and write password protection for .xls workbooks.

Single strong named assembly

Easy integration: no installation or setup is necessary. Reference the assembly from your project.

Medium Trust

Runs in ASP.NET applications with the trust level restricted to Medium Trust, for example on shared hosting.

32-bit and 64-bit

Runs on 32-bit and 64-bit Windows servers.

A workbook, in .NET code.

Create a workbook with values, a formula and a chart, or open an existing one and edit it. The download has C# and VB.NET samples for ASP.NET and Windows Forms.

Create.cs · C#
using ExpertXls.ExcelLib;

// A new workbook in the Excel 2007 or above format (.xlsx)
var workbook = new ExcelWorkbook(ExcelWorkbookFormat.Xlsx_2007);
workbook.LicenseKey = "your license key";

ExcelWorksheet worksheet = workbook.Worksheets[0];
worksheet.Name = "Revenue";

worksheet["A1"].Text = "Region";
worksheet["B1"].Text = "Q1";
worksheet["C1"].Text = "Q2";
worksheet["A1:C1"].Style.Font.Bold = true;

worksheet["A2"].Text = "North";
worksheet["B2"].Value = 48200;
worksheet["C2"].Value = 52400;
worksheet["A3"].Text = "South";
worksheet["B3"].Value = 31500;
worksheet["C3"].Value = 36800;

// A formula and a number format
worksheet["A4"].Text = "Total";
worksheet["B4"].Formula = "=SUM(B2:B3)";
worksheet["C4"].Formula = "=SUM(C2:C3)";
worksheet["B2:C4"].Style.Number.NumberFormatString = "#,##0";

// A column chart from A1:C3, series by rows,
// placed from column 2, row 7 to column 8, row 22
ExcelChart chart = worksheet.Charts.AddChart(ExcelChartType.ColumnClustered,
    worksheet["A1:C3"], true, 2, 7, 8, 22);
chart.Title.Text = "Revenue per quarter";

workbook.Save(@"C:\Docs\revenue.xlsx");
workbook.Close();

Install with dotnet add package ExpertXls.ExcelLibrary, or reference expertxls.dll from the download. Read the online documentation, or try the C# and VB.NET online demos.

ExpertXLS questions, answered.

Common questions about formats, dependencies and licensing.

Does ExpertXLS need Microsoft Office Excel?
No. The library is a .NET managed assembly and does not depend on Microsoft Office Excel. No additional installation is necessary.
Which Excel formats are supported?
The Excel 97-2003 format (.xls) and the Excel 2007 or above format (.xlsx). You can also load data from CSV files and save data to CSV format.
Can I edit an existing Excel document?
Yes. Load the workbook from a file or a stream, change it, and save it to a file or a stream.
Can I load data from a database?
Yes, through a .NET DataTable: LoadDataTable loads its data into a worksheet, and GetDataTable gets the data of a range back into a DataTable.
Can I add charts?
Yes. Add chart shapes to a worksheet or chart worksheets to a workbook, with the data series generated from a range of cells.
What is new in ExpertXLS 10?
Conditional formatting (color scales, data bars, icon sets), AutoFilter, Excel tables with styles and totals rows, find and replace, sorting and sparklines. CSV import now reads numbers, dates and percentages as values.
Is ExpertXLS included in the ExpertPdf Toolkit?
No. The ExpertPdf Toolkit has the PDF tools only. ExpertXLS is part of the ExpertComponents Toolkit Total, and can also be licensed on its own, from $350 for a developer license. See the pricing page.
Which .NET versions and servers are supported?
Any .NET Framework application (ASP.NET, MVC, Windows Forms, WPF), and .NET Core and .NET 5 to .NET 11 through .NET Standard 2.0. The library runs on 32-bit and 64-bit Windows servers, and also in Medium Trust environments such as shared hosting.
Is there an online demo?
Yes. See the C# online demo and the VB.NET online demo.
Can I try it before buying?
Yes. Download the free trial with the C# and VB.NET samples for ASP.NET and Windows Forms, and license it on the pricing page when you are ready.

Create and edit Excel documents from .NET.

Download the free trial with C# and VB.NET samples for ASP.NET and Windows Forms and the API documentation. When you are ready, license ExpertXLS on the pricing page.

Targets.NET Framework · .NET Core · .NET 5 to 11
Versionv10.0.1