ConfigsMay 28, 2026·2 min read

Excelize — High-Performance Go Library for Excel Spreadsheets

Excelize is a Go library for reading, writing, and manipulating Microsoft Excel files (XLSX/XLSM/XLTM). It supports formulas, charts, pivot tables, images, conditional formatting, and streaming writes for large datasets.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Excelize Excel Library
Direct install command
npx -y tokrepo@latest install 3188eebe-5ad3-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

Excelize provides a pure Go implementation for reading and writing Office Open XML spreadsheet files. It lets backend services generate complex Excel reports, import user-uploaded spreadsheets, and process large datasets without relying on external binaries or COM automation.

What Excelize Does

  • Reads and writes XLSX, XLSM, and XLTM files with full formula support
  • Creates charts (bar, line, pie, scatter, and 50+ chart types)
  • Generates pivot tables and applies conditional formatting rules
  • Embeds images, shapes, and comments into cells
  • Streams rows for writing spreadsheets with millions of rows in constant memory

Architecture Overview

Excelize operates on the underlying ZIP-packaged XML structure of Office Open XML files. It parses shared strings, style sheets, and worksheet XML into in-memory Go structs, applies edits, then serializes back to valid OOXML. The streaming writer bypasses full in-memory representation by flushing rows directly to the output, enabling constant-memory writes for large files.

Self-Hosting & Configuration

  • Install via go get github.com/xuri/excelize/v2
  • Zero external dependencies beyond the Go standard library
  • Use StreamWriter for files exceeding available RAM
  • Set default fonts, number formats, and date styles via Style structs
  • Supports password-protected workbook decryption

Key Features

  • Pure Go with no CGO or system dependencies
  • Streaming writer handles millions of rows in constant memory
  • 170+ formula functions evaluated natively
  • 50+ chart types with full customization
  • Thread-safe concurrent read access to workbooks

Comparison with Similar Tools

  • Apache POI (Java) — mature but requires JVM; Excelize is a single Go binary
  • openpyxl (Python) — Python-only; Excelize integrates into Go services natively
  • SheetJS (JS) — browser-focused; Excelize targets server-side batch processing
  • xlsx2csv — read-only conversion; Excelize supports full read-write-chart workflows
  • Google Sheets API — cloud-dependent; Excelize works fully offline

FAQ

Q: Can Excelize handle very large files? A: Yes, the StreamWriter API writes rows incrementally, keeping memory constant regardless of row count.

Q: Does it support formulas? A: Excelize supports setting formula strings and evaluating 170+ built-in functions.

Q: Is Excelize thread-safe? A: Concurrent reads are safe. Writes to a single file should be serialized.

Q: Can I read password-protected Excel files? A: Yes, Excelize supports decrypting workbooks protected with a password.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets