Excelize
Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
What is Excelize?
Excelize is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to go language library for reading and writing microsoft excel™ (xlam / xlsm / xlsx / xltm / xltx) spreadsheets
Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Go language library for reading and writing Microsoft Excel™
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx excelizeConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Excelize
Excelize is a pure Go library for reading and writing XLAM, XLSM, XLSX, XLTM, and XLTX Microsoft Excel spreadsheet files, supporting complex spreadsheet components including charts, pivot tables, formulas (500+ functions), conditional formatting, data validation, images, shapes, and streaming API for high-volume data. It requires Go 1.25 or later and provides a clean, idiomatic Go API for programmatic spreadsheet manipulation without requiring Microsoft Office or any native dependencies. The Excelize MCP server exposes these capabilities to AI coding agents, enabling them to generate, read, and manipulate Excel files through natural language. Developers use it to automate report generation, data export pipelines, and spreadsheet processing workflows entirely in Go.
Prerequisites
- Go 1.25 or later installed
- An MCP-compatible client such as Claude Desktop or Cursor
- Node.js 18+ for the npx-based MCP server installation
- Basic familiarity with Excel spreadsheet structure (sheets, cells, ranges) for effective prompting
Install the Excelize Go library in your project
Add Excelize to your Go module using go get. Use the v2 module path for the current stable release, which supports Go modules properly.
go get github.com/xuri/excelize/v2Create a basic spreadsheet in Go
Create a new Excel file, set cell values, configure the active sheet, and save to disk. This minimal example validates that Excelize is correctly installed and working in your project.
package main
import (
"fmt"
"github.com/xuri/excelize/v2"
)
func main() {
f := excelize.NewFile()
defer f.Close()
f.SetCellValue("Sheet1", "A1", "Hello")
f.SetCellValue("Sheet1", "B1", 42)
if err := f.SaveAs("output.xlsx"); err != nil {
fmt.Println(err)
}
}Read an existing spreadsheet
Open an existing XLSX file with excelize.OpenFile and iterate over rows and columns to extract data. The GetRows function returns a 2D string slice of all cell values in the specified sheet.
f, err := excelize.OpenFile("report.xlsx")
if err != nil { panic(err) }
defer f.Close()
rows, _ := f.GetRows("Sheet1")
for _, row := range rows {
for _, cell := range row {
fmt.Print(cell, "\t")
}
fmt.Println()
}Add the Excelize MCP server to your client configuration
Configure the Excelize MCP server in your MCP client's config file. This enables AI coding agents to generate Go code for spreadsheet creation and manipulation using the Excelize library.
Restart your MCP client and verify
After saving the configuration and restarting your MCP client, you can ask your AI assistant to write Excelize code for specific spreadsheet tasks. The server provides context about Excelize's API and capabilities.
Excelize Examples
Client configuration
Add this block to your claude_desktop_config.json under the mcpServers key to enable the Excelize MCP server.
{
"mcpServers": {
"excelize": {
"command": "npx",
"args": ["excelize"]
}
}
}Prompts to try
Once the server is connected, use these prompts to generate Excel-related Go code with your AI assistant.
- "Write Go code using Excelize to create a monthly sales report with a bar chart from a data slice"
- "Read all rows from Sheet1 of report.xlsx and return them as a Go struct slice"
- "Add conditional formatting to cells in column B that highlights values above 100 in red"
- "Generate a streaming XLSX writer in Go for exporting 1 million rows without running out of memory"Troubleshooting Excelize
Compilation error: 'cannot use excelize.NewFile()' or type mismatch errors
Ensure you are importing the v2 module path 'github.com/xuri/excelize/v2' and not the legacy 'github.com/360EntSecGroup-Skylar/excelize'. Run 'go mod tidy' to resolve module conflicts. The library requires Go 1.25+, so update your toolchain if necessary.
Opening an XLSX file returns 'zip: not a valid zip file' error
XLSX files are ZIP archives. This error means the file is corrupted, truncated, or is not actually an Excel file. Verify the file opens correctly in Excel or LibreOffice. If the file was generated programmatically, ensure all write operations completed and f.SaveAs or f.Save was called before reading.
Memory usage spikes when processing large spreadsheets
Use Excelize's streaming API (excelize.OpenFile with SetColWidth in streaming mode, or excelize.NewStreamWriter) for files with more than ~100,000 rows. The standard API loads the entire file into memory, which is inefficient for large datasets.
Frequently Asked Questions about Excelize
What is Excelize?
Excelize is a Model Context Protocol (MCP) server that go language library for reading and writing microsoft excel™ (xlam / xlsm / xlsx / xltm / xltx) spreadsheets It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Excelize?
Follow the installation instructions on the Excelize GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Excelize?
Excelize works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Excelize free to use?
Yes, Excelize is open source and available under the BSD-3-Clause license. You can use it freely in both personal and commercial projects.
Excelize Alternatives — Similar Databases Servers
Looking for alternatives to Excelize? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
MySQL
★ 1.7kProvides access to MySQL databases with fine-grained access control, supporting multiple databases simultaneously with configurable access modes (readonly, readwrite, full) and table-level permissions using whitelists, blacklists, wildcards, and rege
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Excelize in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Excelize?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.