excelize: Excelize is a pure Go library for reading and writing XLAM, XLSM, XLSX, XLTM, and XLTX spreadsheet files.
What problem it solves
Go applications need a way to create, read, and modify spreadsheet documents produced by Microsoft Excel. They also need support for complex spreadsheet components and workflows involving large worksheet datasets.
Key features
Read and write spreadsheet files — Create and modify workbooks, set cell values, save files, and read cell values and worksheet rows through a Go API.
Source: README
Support multiple Excel formats — Handle XLAM, XLSM, XLSX, XLTM, and XLTX documents generated by Microsoft Excel 2007 and later.
Source: README, file.go
Stream large worksheet data — Use the streaming API to generate or read worksheet data when handling huge amounts of data.
Source: README, stream.go
Add charts and pictures — Generate charts from worksheet data and insert pictures with options for scaling, offsets, printing, and aspect ratio.
Source: README, picture.go
Work with spreadsheet structures — The repository includes implementations for worksheets, formulas, styles, tables, pivot tables, slicers, sparklines, and drawings.
Source: styles.go, table.go, pivotTable.go
Quick start
Copied verbatim from the project's README.
go get github.com/xuri/excelize/v2package main
import (
"fmt"
"github.com/xuri/excelize/v2"
)
func main() {
f := excelize.NewFile()
defer func() {
if err := f.Close(); err != nil {
fmt.Println(err)
}
}()
// Create a new sheet.
index, err := f.NewSheet("Sheet2")
if err != nil {
fmt.Println(err)
return
}
// Set value of a cell.
f.SetCellValue("Sheet2", "A2", "Hello world.")
f.SetCellValue("Sheet1", "B2", 100)
// Set active sheet of the workbook.
f.SetActiveSheet(index)
// Save spreadsheet by the given path.
if err := f.SaveAs("Book1.xlsx"); err != nil {
fmt.Println(err)
}
}Who it may suit
This library may suit Go developers who need to generate, inspect, or modify Excel-compatible spreadsheet documents in their applications or automation tools.
Topics to discuss
Which additional spreadsheet features should be prioritized for the next release?
How should the streaming API support large worksheet processing workflows?
What examples or documentation would help developers adopt the library more effectively?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/qax-os/excelize#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…