Software:Excelize
| Template:Dark mode switch | |
| Developer(s) | Open-source contributors |
|---|---|
| Initial release | 30 August 2016[1] |
| Written in | Go[2] |
| Operating system | Cross-platform[3] |
| Type | Library, Spreadsheet software |
| License | BSD 3-Clause License |
| Website | https://xuri.me/excelize |
Excelize is an open-source library written in Go for reading from and writing to Microsoft Excel spreadsheet files. It supports spreadsheet formats such as XLAM, XLSM, XLSX, XLTM, and XLTX.[4] It implements the Office Open XML standard (ECMA-376 and ISO/IEC 29500).[5]
History
The first commit to the Excelize GitHub repository was made on August 30, 2016. A book about the library, Excelize 权威指南 (Excelize: The Definitive Guide), was published to cover its architecture and usage.[6]
Features
Excelize can read and modify documents generated by Microsoft Excel 2007 and later. Its features include:
- File processing: Creating, reading, and modifying spreadsheets without requiring Microsoft Office.[7]
- Streaming API: A streaming API for reading and writing data in large files to reduce memory usage.
- Workbook elements: Support for inserting charts, pivot tables, and data validation, as well as cell formatting.[8]
- Encryption: Support for encrypting and decrypting Compound File Binary (CFB) formats. Supported algorithms include MD4, MD5, RIPEMD-160, SHA1, SHA256, SHA384, and SHA512.[9]
Security
In July 2026, a Denial of Service (DoS) vulnerability (CVE-2026-54063) was found in Excelize versions prior to 2.11.0.[10]
The vulnerability was located in the `checkSheet` function used for parsing worksheets, which did not validate row indices against Excel's maximum row limit of 1,048,576. Specially crafted XLSX files could cause high memory allocation, leading to application crashes.[11] The issue was fixed in version 2.11.0 by adding bounds checking for worksheet structures.[10]
Example usage
The following is a minimal code example in Go demonstrating how to generate a new Excel spreadsheet, input data into cells, and save the file:[8][12]
f := excelize.NewFile()
defer func() {
if err := f.Close(); err != nil {
fmt.Println(err)
}
}()
// Create a new worksheet named "Sheet2"
index, err := f.NewSheet("Sheet2")
if err != nil {
fmt.Println(err)
return
}
// Set values for cells
f.SetCellValue("Sheet2", "A2", "Hello world.")
f.SetCellValue("Sheet1", "B2", 100)
// Set the active sheet for the workbook
f.SetActiveSheet(index)
// Save the spreadsheet file
if err := f.SaveAs("Book1.xlsx"); err != nil {
fmt.Println(err)
}
See also
References
- ↑ "First GitHub commit for Excelize". github.com. 2016-08-30. https://github.com/xuri/excelize/commit/a9d3ee28693adfe920b3cd047f52862d8a79a00e. Retrieved 2020-11-28.
- ↑ "Top Go XLSX Projects". https://www.libhunt.com/l/go/topic/xlsx.
- ↑ "Comparison of functionality and performance of Aspose.Cells for Go via C with Excelize, Tealeg/xlsx, and Go-OLE". Aspose. https://docs.aspose.com/cells/go-cpp/comparison-of-functionality-and-performance/.
- ↑ "Open Source Go Library - Create XLSX/XLSM Spreadsheets, Add PivotTable". https://products.fileformat.com/spreadsheet/go/excelize/.
- ↑ Kinnari Chohan (2026-04-15). "WebDevPro #127: Excelize Makes Spreadsheet Automation in Go Feel Like a Superpower" (in en). https://www.packtpub.com/en-ua/learning/webdevpro/webdevpro-127-design-patterns-as-decision-frameworks-not-recipes.
- ↑ (in zh) Excelize 权威指南. ISBN 978-7115636478. https://www.google.com.au/books/edition/Excelize_quan_wei_zhi_nan/_Ka70QEACAAJ. Retrieved 18 August 2026.
- ↑ "Reading and Writing Excel Files in Go". 11 April 2024. https://zetcode.com/golang/excel/.
- ↑ 8.0 8.1 "Working with Excel Files Using excelize in Go". 27 November 2024. https://www.slingacademy.com/article/working-with-excel-files-using-excelize-in-go/.
- ↑ "excelize package - github.com/xuri/excelize/v2 - Go Packages". https://pkg.go.dev/github.com/xuri/excelize/v2.
- ↑ 10.0 10.1 "CVE-2026-54063 Detail". NIST. 10 July 2026. https://nvd.nist.gov/vuln/detail/CVE-2026-54063.
- ↑ "Vulnerability Summary for the Week of July 6, 2026". 13 July 2026. https://www.cisa.gov/news-events/bulletins/sb26-194.
- ↑ Kevin Kelche (16 March 2023). "A Guide to working with Excel files in Golang - Excelize". https://www.kelche.co/blog/go/excel/.
Category:Go (programming language) Category:Software using the BSD license Category:Spreadsheet software
