Go Library for Working with Excel XLSX Documents
Open Source Go API that supports Microsoft Excel XLSX Spreadsheet generation, manage worksheets, handling Rows & Columns in Worksheets via Go API.
The xlsx library provides a fast and reliable way for working with Microsoft Excel files using Go. The library helps to simplify reading and writing Excel XLSX file format. XLSX file format was introduced in 2007 and uses the Open XML standard adapted by Microsoft back in 2000. The library is open source and available under the BSD-3-Clause license.
The open source xlsx library supports several important features related to Microsoft Excel Documents creation and manipulation such as creating a new XlSX file, opening existing Excel files, accessing your worksheets, adding new worksheets, Managing rows and columns inside a worksheet, adding cells, getting cell from a row, formatting cells, applying styles to cells, named ranges support and much more.
At A Glance
An overview of xlsx features.
- Create XLSX file
- Modify XLSX file
- Read XLSX
- Add images
- Add charts
- Merge cells
- Copy rows
- Conditional formatting
- Add comments
- Cell ranges
- Add rows
xlsx only requires Go runtime.
- Go 1.2+
Getting Started with Xlsx2Go
The recommended way to install xlsx is from GitHub, Please use the following command for smooth installation.
Install xlsx via GitHub
go get https://github.com/tealeg/xlsx.git
Creating NEW XLSX Files via Go Library
The Open source xlsx library gives software developers the capability to create a new empty XLSX file from scratch using a couple of Go commands. The developers can use the new NewFile() function to generate a new file. Once it is created you can easily add new content to the workbook. You can add a new sheet or appending an existing sheet with ease. Once created and the working is completed, please save your work, it is recommended Close()the sheet.
Access and Read XLSX Files
The Open source xlsx library has provided a set of functions that allow developers to access open and read an existing XLSX spreadsheet file inside their own Go applications. You can also easily access sheets of a workbook with just a couple of Go commands. Developers can also access a particular sheet of their choice with ease.
Handling Rows and Columns in Worksheets
Cells are the backbone of an Excel Worksheet. A worksheet is made up of cells organized in rows and columns. The xlsx library gives software developers a wide range of features for handling rows and columns inside their apps using Go commands. It supports adding new rows and columns, iterating rows and columns, deleting unwanted rows and columns, add new cells to a row, getting value from a cell, apply formatting to a range of cells, and many more.
Apply Styles and Formatting
The Free library xlsx library has provided several important functions that enable software developers to apply formatting and styles to their spreadsheets with ease. Styles provide layout and decoration of cells like font, color, content alignment, font size, fill, etc. You can easily apply the style to a range of cells with just a couple of lines of code. You just need to create a style once and reuse it when needed. You can also apply number and date formats for cells.