About this project

Excelize is a library written in pure Go that provides functions for reading from and writing to XLAM, XLSM, XLSX, XLTM and XLTX files. It supports spreadsheet documents generated by Microsoft Excel 2007 and later, aims for high compatibility with complex spreadsheet components, and includes a streaming API for generating or reading worksheet data with very large amounts of data. The library requires Go version 1.25.0 or later. Installation can be done with go get github.com/xuri/excelize or, when using Go Modules, go get github.com/xuri/excelize/v2. Full documentation is available through Go's built-in documentation tool, on go.dev, and through the project's online docs reference. Basic usage covers creating and reading spreadsheets. A new file can be created with NewFile, worksheets added with NewSheet, cell values set with SetCellValue, the active sheet chosen with SetActiveSheet, and the workbook saved with SaveAs. Reading uses OpenFile, GetCellValue for a single cell, GetRows for all rows in a sheet, and Close to release the file. Excelize also supports charts and images. Charts can be generated from worksheet data or created without worksheet data, using AddChart with chart types such as Col3DClustered and definitions for series names, categories, values and titles. Pictures can be inserted with AddPicture, including options for scaling, printing, offsets and locked aspect ratio. The project welcomes contributions and is released under the BSD 3-Clause License.