Skip to content

aspose-cells/aspose-cells-go-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Product Page Documentation API Ref Examples Blog Support GitHub commits since latest release (by date)

Aspose.Cells for Go via C++

Aspose.Cells for Go via C++ is a native Go library designed for Go developers to programmatically create, manipulate, and convert spreadsheets without needing Office Automation or Microsoft Excel. It supports a variety of spreadsheet formats, including MS Excel 97-2003 (XLS), MS Excel 2007-2016 (XLSX, XLSM, XLSB), Open Office XML, and more. With Aspose.Cells for Go via C++, you can also extract images from worksheets and convert Excel files to PDF. The library further enables the creation and manipulation of charts and shapes. Additionally, it offers robust formula calculation capabilities, providing you with a comprehensive solution for spreadsheet management.

Supported platforms

  • Windows x64
  • Linux x64

Environments and versions

  • Go 1.16 or greater

Quick Start Guide

Installation Aspose.Cells for Go via C++ package and running your code in your project

  1. 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")

}
  1. Initialize project go.mod
go mod init main
  1. 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.

  1. 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.7.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.7.0\lib\win_x86_64\"

Or in your linux bash

export PATH=$PATH:$GOPATH/github.com/aspose-cells/aspose-cells-go-cpp/v25@v25.7.0/lib/linux_x86_64/

You may also copy the DLL files from the above path to the same place as your project executable.

  1. Run your created application.
go run main.go

Rich Features

Aspose.Cells for Go via C++ offers a wide arrange of features for creating, converting and manipulating spreadsheets:

  • Built-In Properties
  • Custom Properties
  • Themes
  • Styles and Formatting
  • Data Validation
  • Conditional Formatting
  • Hyperlink
  • AutoFilter
  • PageSetup
  • Reading, Writing and Calculating Formulas
  • Group Rows and Columns
  • PivotTable
  • Table

Support file format

Format Description Load Save
XLS Excel 95/5.0 - 2003 Workbook.
XLSX Office Open XML SpreadsheetML Workbook or template file, with or without macros.
XLSB Excel Binary Workbook.
XLSM Excel Macro-Enabled Workbook.
XLT Excel 97 - Excel 2003 Template.
XLTX Excel Template.
XLTM Excel Macro-Enabled Template.
XLAM An Excel Macro-Enabled Add-In file that's used to add new functions to Excel.  
CSV CSV (Comma Separated Value) file.
TSV TSV (Tab-separated values) file.
TXT Delimited plain text file.
HTML HTML format.
MHTML MHTML file.
ODS ODS (OpenDocument Spreadsheet).
JSON JavaScript Object Notation
DIF Data Interchange Format.  
PDF Adobe Portable Document Format.  
XPS XML Paper Specification Format.  
SVG Scalable Vector Graphics Format.  
TIFF Tagged Image File Format  
PNG Portable Network Graphics Format  
BMP Bitmap Image Format  
EMF Enhanced metafile Format  
JPEG JPEG is a type of image format that is saved using the method of lossy compression.  
GIF Graphical Interchange Format  
MARKDOWN Represents a markdown document.  
SXC An XML based format used by OpenOffice and StarOffice
FODS This is an Open Document format stored as flat XML.
DOCX A well-known format for Microsoft Word documents that is a combination of XML and binary files.
PPTX The PPTX format is based on the Microsoft PowerPoint open XML presentation file format.

Evaluate Aspose.Cells for Go via C++

You can use Aspose.Cells for Go via C++ free of cost for evaluation.The evaluation version provides almost all functionality of the product with certain limitations. The same evaluation version becomes licensed when you purchase a license and add a couple of lines of code to apply the license. If you want to test Aspose.Cells for Go via C++ without evaluation version limitations, you can also try a 30-Day Temporary License. Please refer to How to get a Temporary License?

Limitations of Evaluation version

The evaluation version of Aspose. Cells for Go via C++ provides complete product functionality. An evaluation watermark will be inserted when saving the file. And the evaluation version can open up to 100 files.

Run Aspose.Cells for Go via C++ in production

A commercial license key is required in a production environment. Please contact us to purchase a commercial license if you want to publish application to the product server.

How to Install Aspose.Cells for Go via C++

How to Install Aspose.Cells for Go via C++ Using the Go Command

  • From Go 1.16, you use go install command directly to install the Aspose.Cells for Go via C++ package. The command allows for the global installation of command-line tools without worrying about affecting existing project dependencies.
go install github.com/aspose-cells/aspose-cells-go-cpp/v25@latest
go get github.com/aspose-cells/aspose-cells-go-cpp/v25@v25.7.0

How to build Aspose.Cells for Go via C++ from the Source Code Package and run samples

  1. Create a work directory for your project.

  2. Get the source code about Aspose.Cells for Go via C++ source package

  • Clone the source code from GitHub
git clone https://github.com/aspose-cells/aspose-cells-go-cpp.git cells-go-cpp

Or

  1. Navigate to cells-go-cpp folder and build source code
cd "your work directory"/cells-go-cpp/
go build .
  1. Set your PATH to point to the shared libraries in Aspose.Cells for Go via C++ in your current command shell.
set PATH=%PATH%;%YourProjectPath%\cells-go-cpp\lib\win_x86_64\

Or in your powershell

$env:Path = $env:Path+ ";${YourProjectPath}\cells-go-cpp\lib\win_x86_64\"

Or in your bash

export PATH=$PATH:${YourProjectPath}/cells-go-cpp/lib/linux_x86_64/
  1. Navigate to the ./samples directory and run all sample.
go run .