Click or drag to resize

Getting Started with ExpertXls Library for .NET

ExpertXls Excel Library for .NET does not need an installer. Add it to your project from NuGet, or reference the assembly from the downloaded archive.

Installation using the NuGet package

In Visual Studio open the NuGet Package Manager and install one of the packages below, or run the dotnet add package command:

dotnet add package ExpertXls.ExcelLibrary

The packages contain the library for .NET Framework 2.0 and later, .NET Framework 4.0 and later, and .NET Standard 2.0 for .NET Core 2.0 and later and .NET 5 to .NET 11. The x64 package is for applications that run in 64-bit processes only (the project platform target is x64).

On .NET Core and .NET 5 or later the library runs on Windows: the pictures use System.Drawing. In these applications register the code pages encoding provider once, when the application starts, so that Excel 97-2003 workbooks and CSV files with code page encodings can be read and written:

System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
Installation using the downloaded assemblies

Unzip the downloaded archive in a folder. It contains:

  • Bin\expertxls.dll - the library for .NET Framework 2.0, 3.0 and 3.5 applications, with expertxls.xml, the documentation shown by IntelliSense.

  • Bin\.NET_4.0\expertxls.dll - the library for .NET Framework 4.0 and later applications (4.0 to 4.8.1), with its expertxls.xml.

  • Doc - this documentation: ExpertXls-API.chm and the same content as a web site (open Doc\index.html).

  • Samples - .NET Framework 4.6.2 samples in C# and VB.NET that reference the library from the Bin\.NET_4.0 folder: a Windows Forms application for each feature (WinForms folder), a console application that creates the workbooks of all the features (CommandLine folder), and two ASP.NET Web Forms web sites (AspNet folder). Open the .sln file of a sample in Visual Studio 2019, 2022 or 2026.

  • Samples_NET_10 - the same samples for .NET 10 and .NET 11 (Windows Forms, console and a Blazor web application), which use the ExpertXls.ExcelLibrary NuGet package.

In your project add a reference to the expertxls.dll for your .NET Framework version. The library is a single assembly: deploy it with your application, in the bin folder of a web application.

The samples

Each feature sample creates a workbook in the Excel 97-2003 or Excel 2007 or later format:

  • Getting Started - styles, page setup, merged cells, pictures, a formula, a chart, hyperlinks

  • Cells and Ranges - A1 notation, row and column indexes, named ranges, the used range

  • Cell Styles - fills, fonts, borders, alignment and text rotation

  • Data Types and Formats - text, numbers, dates and booleans with number formats

  • Charts - 2D and 3D charts with generated or custom series, a chart worksheet

  • Images - pictures at real size, scaled, stretched and loaded from a file

  • Formulas - formulas, array formulas, named ranges in formulas, calculated results

  • Data Validation - lists, numbers, dates and text length

  • DataTable Import and Export - a worksheet read into a DataTable and loaded back

  • CSV Import and Export - a CSV file imported into a workbook, a worksheet saved as CSV

  • Edit a Workbook - an existing workbook opened, changed and saved

  • Workbook Security - worksheet and workbook protection, password to open the workbook

  • Invoices (web samples and console) - an invoice workbook created from data, with formulas and a pie chart

See Also

Other Resources

Requirements
Licensing