The V5 core does not depend on any UI. unvell.ReoGrid.One.Core targets net10.0, has
no dependencies, and runs on Windows, Linux and macOS.
In V4 the model was tightly coupled to the control, so server-side use was never practical. The separation in V5 exists precisely to make this scenario work.
What you can do
What the .Core package includes:
Workbook/Worksheet(storage, styles, merges, borders, rich text)- The formula engine (122 functions, dependency-based recalculation, cross-sheet references, defined names)
- Conditional formatting
- I/O — reogrid-json, CSV, XLSX and PDF
- Page-break and print-layout calculation
What it does not include: on-screen display, mouse and keyboard interaction, and cell editors (these live in the UI packages).
Reading XLSX and producing a PDF
using unvell.ReoGrid.Core;
using unvell.ReoGrid.IO.Excel;
using unvell.ReoGrid.IO.Pdf;
var workbook = XlsxReader.Read("input.xlsx");
// The cached values Excel saved are read as-is, so nothing is re-evaluated on load.
// Recalculate only when the value actually changed.
var sheet = workbook[0];
sheet.SetNumber(1, 1, 500);
sheet.Recalculate();
PdfExporter.Export(workbook, "output.pdf");
The PDF embeds a Japanese font (IPAexGothic), so Japanese text renders correctly even when no fonts are installed on the server.
Building from scratch and writing XLSX
using unvell.ReoGrid.Core;
using unvell.ReoGrid.Core.Style;
using unvell.ReoGrid.IO.Excel;
var workbook = new Workbook();
var sheet = workbook.AddWorksheet("Sales");
sheet.SetText(0, 0, "Month");
sheet.SetText(0, 1, "Amount");
sheet.SetRowStyle(0, new StyleRecord { Bold = true });
for (int i = 0; i < 12; i++)
{
sheet.SetText(i + 1, 0, $"{i + 1}Month");
sheet.SetNumber(i + 1, 1, 1000 * (i + 1));
}
sheet.SetText(13, 0, "Total");
sheet.SetFormula(13, 1, "SUM(B2:B13)");
sheet.SetNumberFormat(new RangePosition(1, 1, 13, 1), "#,##0");
XlsxWriter.Write(workbook, "sales.xlsx");
Reading a large XLSX partially
To work with a sheet without loading it entirely into memory, use OpenVirtual.
using var virtualBook = XlsxReader.OpenVirtual("large.xlsx", SheetLoadMode.OnDemand);
Loading is streamed through XmlReader, and memory usage is proportional to the number
of cells that actually exist (not to the sheet’s declared dimensions).
CSV and JSON
using unvell.ReoGrid.Core.IO;
// CSV (RFC 4180)
CsvIO.Read(sheet, File.ReadAllText("data.csv"));
File.WriteAllText("out.csv", CsvIO.Write(sheet));
// reogrid-json - the format that interoperates with the web edition (reogrid-web)
string json = ReoGridJsonIO.Write(workbook, pretty: true);
var restored = ReoGridJsonIO.Read(json);
Licensing
Headless use requires a license key — there is no
reduced mode that runs unlicensed. Without a valid key, every file I/O call throws
ReoGridLicenseException: XLSX reads and writes, CSV, PDF and reogrid-json alike. Nothing is
produced, and the path overload of XlsxWriter.Write does not even leave an empty file behind.
Headless output carries no watermark and no notice sheet. A watermark only means anything when somebody is looking at the screen, so the interactive grid takes that route instead — read-only plus a watermark — while file I/O refuses outright. Apply a trial key to evaluate.
using unvell.ReoGrid.Core.License;
ReoGridLicense.SetLicense(Environment.GetEnvironmentVariable("REOGRID_LICENSE")!);