Excelize

v1.0.0Databasesstable

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

agentaianalyticschartecma-376
Share:
20,607
Stars
0
Downloads
0
Weekly
0/5

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

Excel spreadsheet handling
Data processing
Formula evaluation
qax-os

Maintainer

LicenseBSD-3-Clause
Languagego
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx excelize

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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/v2
2

Create 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)
    }
}
3

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()
}
4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "excelize": { "command": "npx", "args": ["-y", "excelize"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides