SheetCompressor 0.1.0
See the version list below for details.
dotnet add package SheetCompressor --version 0.1.0
NuGet\Install-Package SheetCompressor -Version 0.1.0
<PackageReference Include="SheetCompressor" Version="0.1.0" />
<PackageVersion Include="SheetCompressor" Version="0.1.0" />
<PackageReference Include="SheetCompressor" />
paket add SheetCompressor --version 0.1.0
#r "nuget: SheetCompressor, 0.1.0"
#:package SheetCompressor@0.1.0
#addin nuget:?package=SheetCompressor&version=0.1.0
#tool nuget:?package=SheetCompressor&version=0.1.0
SheetCompressor
Independent C# implementation of the SheetCompressor encoding from the SpreadsheetLLM paper (Dong et al., Microsoft, 2024). Turns a spreadsheet grid into compact, LLM-friendly text — three interchangeable encodings plus token estimates — and makes no LLM calls itself.
Independent, community implementation. Not affiliated with or endorsed by Microsoft. Part of the multi-language
sheet-compressorproject.
Install
dotnet add package SheetCompressor
Usage
using SheetCompressor;
var grid = new Grid
{
Origin = new Origin(1, 1),
Rows = new IReadOnlyList<string>[]
{
new[] { "Name", "Qty", "Price" },
new[] { "Apple", "3", "1.50" },
},
};
var result = Compressor.Compress(grid);
Console.WriteLine(result.Encodings.Anchor.String); // the LLM-ready text
Console.WriteLine($"{result.Encodings.Anchor.TokenEstimate} vs {result.RawBaseline.TokenEstimate}");
Each result carries three encodings — Anchor, InvertedIndex, FormatAggregation — every
one with a .String, a .Json, and a .TokenEstimate, plus RawBaseline and any Charts.
Per-encoding reader prompt templates are available via PromptsLoader.Instance and ship with
the package.
For reading .xlsx files, add the optional
SheetCompressor.Xlsx package.
License
MIT. The SheetCompressor algorithm originates from the SpreadsheetLLM paper, credited above.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- SharpToken (>= 2.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SheetCompressor:
| Package | Downloads |
|---|---|
|
SheetCompressor.Xlsx
Optional .xlsx adapter for SheetCompressor (ClosedXML): reads a single sheet — grid, origin, per-cell data type, and embedded chart descriptors — into the SheetCompressor.Grid shape. Not affiliated with Microsoft. |
GitHub repositories
This package is not used by any popular GitHub repositories.
First public release (v0.1.0). https://github.com/mythopoeic/sheet-compressor/releases/tag/v0.1.0