SheetCompressor 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SheetCompressor --version 0.1.0
                    
NuGet\Install-Package SheetCompressor -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SheetCompressor" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SheetCompressor" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SheetCompressor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SheetCompressor --version 0.1.0
                    
#r "nuget: SheetCompressor, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SheetCompressor@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SheetCompressor&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SheetCompressor&version=0.1.0
                    
Install as a Cake Tool

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-compressor project.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
0.1.1 153 6/18/2026
0.1.0 131 6/18/2026