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
Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Go version 1.25.0 or later. The full docs can be seen using go's built-in documentation tool, or online at go.dev and docs reference.
go get github.com/xuri/excelizego get github.com/xuri/excelize/v2Here is a minimal example usage that will create spreadsheet file.
…The following constitutes the bare to read a spreadsheet document.
…With Excelize chart generation and management is as easy as a few lines of code. You can build charts based on data in your worksheet or generate charts without any data in your worksheet at all.
……Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change. XML is compliant with part 1 of the 5th edition of the ECMA-376 Standard for Office Open XML.
This program is under the terms of the BSD 3-Clause License. See https://opensource.org/licenses/BSD-3-Clause.
The Excel logo is a trademark of Microsoft Corporation. This artwork is an adaptation.
The Go gopher was created by Renee French. Licensed under the Creative Commons 4.0 Attributions license.
Don't SUM numeric text and logical values from cell references
The minus operator treats an error operand as zero
GO-2026-6452 still reported as unfixed in Excelize v2.11.0
Pivot tables: colFields "data" field always after user specified colFields
INDIRECT ignores the worksheet name, loses the cell type and returns "" for "$A$1"
VALUE of an empty cell returns #VALUE! instead of 0
A negative zero is not equal to zero in = and <> and is not counted by COUNTIF
MINVERSE of a 2x2 matrix returns a matrix of zeros
OR returns the text "TRUE" and drops the arguments after a cell range
VLOOKUP and XLOOKUP match a substring of a cell instead of the whole cell