Egap.Spreadsheets
2.3.0-preview.1
dotnet add package Egap.Spreadsheets --version 2.3.0-preview.1
NuGet\Install-Package Egap.Spreadsheets -Version 2.3.0-preview.1
<PackageReference Include="Egap.Spreadsheets" Version="2.3.0-preview.1" />
<PackageVersion Include="Egap.Spreadsheets" Version="2.3.0-preview.1" />
<PackageReference Include="Egap.Spreadsheets" />
paket add Egap.Spreadsheets --version 2.3.0-preview.1
#r "nuget: Egap.Spreadsheets, 2.3.0-preview.1"
#:package Egap.Spreadsheets@2.3.0-preview.1
#addin nuget:?package=Egap.Spreadsheets&version=2.3.0-preview.1&prerelease
#tool nuget:?package=Egap.Spreadsheets&version=2.3.0-preview.1&prerelease
Egap.Spreadsheets
Preview: 2.3.0-preview.1 is the first release, and the API may still change before the stable 2.3.0. Install it with
dotnet add package Egap.Spreadsheets --prerelease; it brings Egap.Documents 2.3.0-preview.1.
Spreadsheets for .NET 10: workbooks you create and edit from code, and Excel files (XLSX, XLSM, XLTX, XLTM) loaded and saved with what they hold kept. OpenDocument spreadsheets (ODS, OTS, FODS) load and save too, encrypted with a password if asked, their formulas translated between OpenFormula and Excel's. Excel files can be encrypted with a password, Excel binary workbooks (XLSB) load with their formulas decoded, and Excel 97-2003 workbooks (XLS) load with their formulas decoded and their charts, pictures, notes and pivot tables. Sheets are sparse, up to 1,048,576 rows by 16,384 columns, and keep text and cell styles once per workbook, as Excel does. Fully managed and MIT-licensed; part of Egap.
using Egap.Spreadsheets;
Workbook book = Workbook.Create();
Worksheet sheet = book.Worksheets[0];
sheet["A1"].Value = "Region";
sheet["B1"].Value = "Sales";
sheet["A2"].Value = "North";
sheet["B2"].Value = 1250.5;
sheet["B3"].Formula = "SUM(B2:B2)";
sheet.Range("A1:B1").UpdateStyle(s => s with { Font = s.Font with { Bold = true } });
sheet["B2"].NumberFormat = "#,##0.00";
string shown = sheet["B2"].Text; // "1,250.50", as Excel shows it
book.Save("sales.xlsx");
sheet.SaveCsv("sales.csv");
Workbook loaded = Workbook.Load("sales.xlsx");
Tables, data validation, conditional formatting, notes, hyperlinks, pictures and charts are read, edited and written, and a
loaded workbook saves its pivot tables, macros and the rest as they were. PivotTable.Refresh and Workbook.RefreshPivotTables read a pivot table's source again and lay it out as Excel's Refresh does. ConditionalFormats.Evaluate and DataValidations.IsValid work out
the format each cell shows and whether its value passes, as Excel does. InsertRows, DeleteRows, InsertColumns and DeleteColumns
edit a sheet as Excel does, with every formula, name, rule, table and chart that refers to the cells following them. CellRange.CopyTo and MoveTo copy and move ranges as Excel's Copy, Cut and Paste do. CellRange.Sort, AutoFilter.Apply and Find and Replace sort, filter and search as Excel does. AutoFitColumns and AutoFitRows fit widths and heights to the text as Excel's AutoFit does. Printing, PDF and images draw the charts, chart
sheets too. SheetReader and SheetWriter stream
rows through XLSX and CSV in constant memory.
Number format codes show values as Excel does (cell.Text, NumberFormatCode), in any culture, and CSV and TSV are
read and written with type detection. Cell.ImportData writes lists of objects, DataTables and data readers into cells,
and ToDataTable and ToList<T> read ranges back. Sheets and workbooks are protected and unlocked with passwords hashed
as Excel hashes them. Formulas are read and checked against Excel's grammar, in A1 or R1C1 style
(cell.FormulaR1C1), sheet.Evaluate evaluates one with Excel's rules for values, errors, references and dates, and
book.Calculate() recalculates what changed through a dependency graph, with shared and array formulas, circular
references and iteration, dynamic arrays that spill, LET, LAMBDA and structured references. 491 of the 524 functions on Microsoft's list are built in and checked against Excel itself;
FunctionRegistry adds functions of your own. sheet.SaveAsPdf and book.SaveAsPdf print as Excel prints, with its page
breaks, print titles, fit to pages, headers and footers, cell formatting, conditional colours and pictures, to PDF (tagged,
PDF/A or PDF/UA when asked), and Paginate lays the pages out to draw on any Egami canvas or render to images.
SpreadsheetFormat.Register() lets Document.Load read XLSX and CSV, a section per sheet with its table of displayed values,
so HTML, Markdown, DOCX, text and RAG chunks work on them, and Workbook.FromTables puts the tables of a document or a PDF on
sheets.
Not yet in the preview: writing XLS and XLSB, Excel 95 and older files, XLS form controls, the FORECAST.ETS and cube
functions, external data and Power Query, translated function names, and running macros. The guide's
Known limits has the full list.
Source, guide and changelog: github.com/inexin/Egap.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Egap.Documents (>= 2.3.0-preview.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.0-preview.1 | 58 | 11/13/2026 |