Getting Started
Getting Started with Aspose.Cells FOSS for Go
Welcome to the Aspose.Cells FOSS for Go Getting Started Guide! This introduction will help you install the library, verify your environment, and start creating Excel spreadsheets in minutes.
System Requirements
Supported Go Versions
- Go 1.24 or later, per the module’s
go.mod
No Additional Dependencies
go.mod declares no require entries. Aspose.Cells FOSS for Go is built entirely on the Go standard library — no cgo, no native Office libraries, and no system packages required.
Installation
Install via go get (recommended)
go get github.com/aspose-cells-foss/Aspose.Cells-FOSS-for-Go/v26Verify the installation by importing the package:
import cells_foss "github.com/aspose-cells-foss/Aspose.Cells-FOSS-for-Go/v26/aspose/cells_foss"For more details see the Installation Guide.
What You Can Do with Aspose.Cells FOSS for Go
Out-of-the-box spreadsheet processing features include:
- Create new workbooks and worksheets from scratch, or load and modify existing
.xlsxfiles - Read and write individual cells through the
Cells()collection (Cells().Get(ref)/Cells().Set(ref, value)) - Apply cell styles: font, fill, alignment, and border via reusable
Styleobjects - Attach list and whole-number data validation rules with custom error messages
- Build structured
Tableranges with a header row and named table style - Embed pictures with
Worksheet.AddPicture - Export to and import from CSV
- Stream large workbooks row by row with
StreamingReader, without loading the whole sheet into memory - Protect workbooks with a password (
Workbook.SetPassword/VerifyPassword)
Basic Example
Here is a simple example that creates a workbook, writes a few cells, and saves it as .xlsx:
func main() {
wb := cells_foss.NewWorkbook()
ws := wb.Worksheets[0]
ws.Cells().Set("A1", "Hello")
ws.Cells().Set("B1", "World")
ws.Cells().Set("A2", "Answer")
ws.Cells().Set("B2", 42)
outPath := "outputfiles/basic.xlsx"
if err := wb.Save(outPath); err != nil {
fmt.Printf("Error saving workbook: %v\n", err)
return
}
fmt.Printf("Workbook saved to %s\n", outPath)
}Next Steps
Continue learning with these resources:
- Installation Guide: Detailed
go getsetup and module verification - Quickstart: A complete first-workbook walkthrough
- Developer Guide: Practical tutorials covering all major features
- API Reference: Full class and method documentation
- Knowledge Base: Task-oriented how-to guides