excelize
Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
Excelize is a Go library for creating, reading, and modifying Excel spreadsheet files programmatically, with support for charts, images, multiple sheets, and a streaming API for large datasets.
Excelize is a Go library for reading and writing Microsoft Excel spreadsheet files in the XLAM, XLSM, XLSX, XLTM, and XLTX formats. It supports files generated by Microsoft Excel 2007 and later, complies with the ECMA-376 Office Open XML standard, and requires Go version 1.25.0 or later. The library is BSD 3-Clause licensed.
Core capabilities include creating and saving spreadsheets, reading cell values, working with multiple sheets, adding charts (with support for types such as 3D clustered column charts), inserting pictures with scaling and positioning options, and streaming API support for working with large datasets. Charts can be built from worksheet data or generated independently. Images in GIF, JPEG, and PNG formats can be inserted with options for scaling, offset, aspect ratio locking, and print settings. The library is installable via go get as github.com/xuri/excelize/v2. Full API documentation is available at go.dev and at xuri.me/excelize.
Where it fits
- Generate Excel reports from a Go web service and send them to users as downloadable files.
- Read and process data from Excel files uploaded by users in a Go application.
- Build a Go tool that produces Excel spreadsheets with embedded charts from database query results.
- Stream-write large datasets to an Excel file without loading all rows into memory at once.