Aspose.Cells for Go via C++ is a cross-platform native assembly that can be deployed simply by copying it. You can use it to develop 64-bit applications in any development environment that supports Go, such as, Microsoft Visual Code. You don't have to worry about other services or modules. It supports Excel 97-2003 (XLS), Excel 2007-2013/2016/365 (XLSX, XLSM, XLSB), OpenOffice XML, LibreOffice (ODS), and other formats such as CSV, TSV, and more.
Aspose.Cells for Go via C++ Library allows you to work with the built-in as well as the custom document properties in Microsoft Excel. Supports high-quality conversion of Excel Workbooks to PDF/A compliant files. Work with formulas, pivot tables, worksheets, tables, ranges, charts, OLE objects, and much more.
Aspose.Cells for Go via C++ Library allows the developers to work with spreadsheet rows, columns, data, formulas, pivot tables, worksheets, tables, charts, and drawing objects from their own Go applications.
Directory | Description |
---|---|
Examples | A collection of GoLang examples that help you learn and explore the API features. |
- Load existing spreadsheets or create one from scratch.
- Convert spreadsheets to any supportted file format.
- Convert worksheets to different image formats.
- Apply conditional formatting as per your choice. -- Manipulate Pivot Tables in your spreadsheets.
- Convert table to range without losing formatting.
- Fetch a cell's name by providing the row and column index, similarly, fetch row and column index of cell from its name. -- Create & customize Excel charts.
- Render charts as images & PDF.
Microsoft Excel: XLS, XLSX, XLSB
Text: CSV, TSV
OpenDocument: ODS
Others: HTML, MHTML
Microsoft Excel: XLSM, XLTX, XLTM, XLAM
Fixed Layout: PDF, XPS
Images: JPEG, PNG, BMP, GIF, EMF, SVG
- Download the ZIP file and extract it to the specified directory(C:\CellsGO).
- Open the terminal(powershell) and navigate to the directory
Set-Location C:\CellsGO\Examples\CellsGoCPP
. - Run the command
go mod tidy
- Set the environment Path variable
$env:Path += ";C:\Users\Cells\go\pkg\mod\github.com\aspose-cells\aspose-cells-go-cpp\v25@v25.9.0\lib\win_x86_64\"
. - Run the command
go run main.go
- Create a directory for your project and a main.go file within. Add the following code to your main.go.
package main
import (
. "github.com/aspose-cells/aspose-cells-go-cpp/v25"
"fmt"
)
func main() {
lic, _ := NewLicense()
lic.SetLicense_String("YOUR_LICENSE_File_PATH")
workbook, _ := NewWorkbook()
worksheets, _ := workbook.GetWorksheets()
worksheet, _ := worksheets.Get_Int(0)
cells, _ := worksheet.GetCells()
cell, _ := cells.Get_String("A1")
cell.PutValue_String_Bool("Hello World!", true)
style, _ := cell.GetStyle()
style.SetPattern(BackgroundType_Solid)
color, _ := NewColor()
color.Set_Color_R(uint8(255))
color.Set_Color_G(uint8(128))
style.SetForegroundColor(color)
cell.SetStyle_Style(style)
workbook.Save_String("HELLO.pdf")
}
- Initialize project go.mod
go mod init main
- Fetch the dependencies for your project.
go mod tidy
If Aspose.Cells for Go via C++ is not installed in the development environment, Go will automatically install the package in the $GOPATH
subdirectory.
- Set your PATH to point to the shared libraries in Aspose.Cells for Go via C++ in your current command shell. Replace your_version with the version of Aspose.Cells for Go via C++ you are running.
set PATH=%PATH%;%GOPATH%\github.com\aspose-cells\aspose-cells-go-cpp\v25@v25.9.0\lib\win_x86_64\
Or in your powershell
$env:Path = $env:Path+ ";${env:GOPATH}\github.com\aspose-cells\aspose-cells-go-cpp\v25@v25.9.0\lib\win_x86_64\"
Or in your linux bash
export PATH=$PATH:$GOPATH/github.com/aspose-cells/aspose-cells-go-cpp/v25@v25.9.0/lib/linux_x86_64/
You may also copy the DLL files from the above path to the same place as your project executable.
- Run your created application.
go run main.go