RepositoryC#CHSwitzerland
rabanti-github

rabanti-github/PicoXLSX

PicoXLSX is a small .NET / C# library to create XLSX files (Microsoft Excel 2007 or newer) in an easy and native way

57stars
15forks
6issues
1views

PicoXLSX

PicoXLSX

nuget NuGet Downloads GitHub License FOSSA Status

PicoXLSX is a small .NET library written in C#, to create Microsoft Excel files in the XLSX format (Microsoft Excel 2007 or newer) in an easy and native way

  • :white_check_mark: Minimum of dependencies (*
  • :x: No need for an installation of Microsoft Office
  • :x: No need for Office interop libraries
  • :x: No need for proprietary 3rd party libraries
  • :x: No need for an installation of the Microsoft Open Office XML SDK (OOXML)

:arrow_right: Please have a look at the codebase library NanoXLSX for the full source code of PicoXLSX and NanoXLSX.

:globe_with_meridians: Project website: https://picoxlsx.rabanti.ch

:page_facing_up: See the Change Log for recent updates.

:package: Modules

PicoXLSX v4 is split into modular NuGet packages:

ModuleStatusDescription
NanoXLSX.Core:green_circle: Mandatory, BundledCore library with workbooks, worksheets, cells, styles. No external dependencies
NanoXLSX.Writer:large_blue_circle: Optional, BundledExtension methods to write/save XLSX files. Depends on Core
NanoXLSX.Formatting:large_blue_circle: Optional, BundledIn-line cell formatting (rich text). External repo. Depends on Core
PicoXLSX:star: Meta-PackageBundles all of the above. Recommended for most users
NanoXLSX.Reader:white_circle: Optional, Not bundledExtension methods to read/load XLSX files. Depends on Core

Note: All bundled modules are included when you install the PicoXLSX meta-package. Optional, non-bundled modules will extend the functionality of PicoXLSX

For advanced scenarios, you can install only the specific packages you need (e.g. NanoXLSX.Core + NanoXLSX.Reader for read-only applications).

:sparkles: What's new in version 4.x

PicoXLSX v4 is a major release with significant architectural changes:

  • Modular architecture - Split into separate NuGet packages (Core, Reader, Writer, Formatting) with a plugin system
  • New Color system - Unified Color class supporting RGB, ARGB, indexed, theme and system colors
  • Redesigned Font and Fill - Font properties now use proper enums; Fill supports flexible color definitions with tint
  • PascalCase naming - All enums and constants follow C# naming conventions
  • Immutable value types - Address and Range structs are now immutable
  • In-line formatting - Rich text cell formatting via the NanoXLSX.Formatting module
  • Utils reorganization - Utils class split into DataUtils, ParserUtils, Validators

:warning: Breaking changes from v3.x - There are breaking changes between PicoXLSX v3.4.5 and v4.0.0, mostly related to namespace changes and renamed enum values. See the Migration Guide for detailed upgrade instructions.

:world_map: Roadmap

PicoXLSX v4.x (NanoXLSX v3.x) is planned as the long-term supported version. Possible future enhancements include:

  • :lock: Modern password handling (e.g. SHA-256 for worksheet protection)
  • :art: Auto-formatting capabilities
  • :1234: Formula assistant for easier formula creation
  • :paintbrush: Modern Style builder API
  • :speech_balloon: Support for cell comments
  • :framed_picture: Embedded images and charts
  • :rocket: Performance optimizations

:robot: For AI Agents

For AI agents and LLM tooling, a machine-readable llms.txt is available. It lists all packages, installation commands, API documentation, source repositories, and a quick-start code snippet.

:gear: Requirements

The library is currently on compatibility level with .NET version 4.5 and .NET Standard 2.0. Newer versions should of course work as well. Older versions, like .NET 3.5 have only limited support, since newer language features were used.

.NET 4.5 or newer

*)The only requirement to compile the library besides .NET (v4.5 or newer) is the assembly WindowsBase, as well as System.IO.Compression. These assemblies are standard components in all Microsoft Windows systems (except Windows RT systems). If your IDE of choice supports referencing assemblies from the Global Assembly Cache (GAC) of Windows, select WindowsBase and Compression from there. If you want so select the DLLs manually and Microsoft Visual Studio is installed on your system, the DLL of WindowsBase can be found most likely under "c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll", as well as System.IO.Compression under "c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.IO.Compression.dll". Otherwise you find them in the GAC, under "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\WindowsBase" and "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.IO.Compression"

The NuGet package does not require dependencies

.NET Standard

.NET Standard v2.0 resolves the dependency System.IO.Compression automatically, using NuGet and does not rely anymore on WindowsBase in the development environment. In contrast to the .NET >=4.5 version, no manually added dependencies necessary (as assembly references) to compile the library.

:hammer_and_wrench: Development and Testing

The full source code of PicoXLSX is available in the NanoXLSX repository. There are also thousands of unit tests available, ensuring a very high code coverage and security against unwanted side effects on changes.

:inbox_tray: Installation

By package Manager (PM):

Install-Package PicoXLSX

By .NET CLI:

dotnet add package PicoXLSX

:information_source: Note: Other methods like adding DLLs or source files directly into your project are technically still possible, but not recommended anymore. Use dependency management, whenever possible

:bulb: Usage

Quick Start (shortened syntax)

 Workbook workbook = new Workbook("myWorkbook.xlsx", "Sheet1");         // Create new workbook with a worksheet called Sheet1
 workbook.WS.Value("Some Data");                                        // Add cell A1
 workbook.WS.Formula("=A1");                                            // Add formula to cell B1
 workbook.WS.Down();                                                    // Go to row 2
 workbook.WS.Value(DateTime.Now, Style.BasicStyles.Bold);               // Add formatted value to cell A2
 workbook.Save();                                                       // Save the workbook as myWorkbook.xlsx

Quick Start (regular syntax)

 Workbook workbook = new Workbook("myWorkbook.xlsx", "Sheet1");         // Create new workbook with a worksheet called Sheet1
 workbook.CurrentWorksheet.AddNextCell("Some Data");                    // Add cell A1
 workbook.CurrentWorksheet.AddNextCell(42);                             // Add cell B1
 workbook.CurrentWorksheet.GoToNextRow();                               // Go to row 2
 workbook.CurrentWorksheet.AddNextCell(DateTime.Now);                   // Add cell A2
 workbook.Save();                                                       // Save the workbook as myWorkbook.xlsx

See the full API-Documentation at: https://rabanti-github.github.io/PicoXLSX/.

The Demo Project contains 25 examples covering various use cases. The demo project is maintained in a separate repository. See the section PicoXLSX for the specific examples related to PicoXLSX.

See also: Getting started in the Wiki

Hint: You will find most certainly any function, and the way how to use it, in the Unit Test Project of nanoXLSX

:balance_scale: License

PicoXLSX is licensed under the MIT License. See the LICENSE file for more details.

This library claims to be free of any dependencies on proprietary software or libraries. FOSSA Status

Similar Projects

Discover other similar projects and AI models.

Repository
SheetJS/sheetjs

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs

36.3k
Apr 18, 2024
RepositoryTypeScript
dream-num/univer

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

32.4k
Dec 2, 2026
RepositoryC#
JanKallman/EPPlus

Create advanced Excel spreadsheets using .NET

3.8k
Aug 29, 2020
RepositoryC#
rabanti-github/NanoXLSX

NanoXLSX is a small .NET library written in C#, to create and read Microsoft Excel files in the XLSX format (Microsoft Excel 2007 or newer) in an easy and native way

165
Nov 22, 2026
RepositoryGo
qax-os/excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets

21.2k
Nov 25, 2026
RepositoryJavaScript
dream-num/Luckysheet

Luckysheet upgraded to Univer

16.6k
Aug 19, 2025
RepositoryPHP
PHPOffice/PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files

14.0k
Nov 26, 2026
RepositoryTypeScript
genspark-ai/genoffice

Free, open-source AI Office suite: Docs, Sheets, Slides, PDF, Markdown and HTML editors with a built-in AI agent, plus a `genoffice` CLI and agent skill so Claude Code, Codex and Cursor can create and edit real .docx/.xlsx/.pptx files locally. Bring your own key. macOS, Windows & Linux.

13.3k
Dec 2, 2026
RepositoryShell
ONLYOFFICE/DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.

7.2k
Nov 13, 2026