Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-go
apiKey := "XXXXX" //sepcify App Key
appSid := "XXXXX" //sepcify App SID
apiServer := "https://api.aspose.cloud/v3.0"
dataFolder := "../../data/"
remoteFolder := "GoFiles"
name := "Book1.xlsx"
sheetName := "Sheet1"
//Instantiate Aspose Cells API SDK
CellsAPI := NewCellsApiService(apiKey, appSid, apiServer)
args := new(UploadFileOpts)
args.Path = remoteFolder + "/" + name
file := os.Open(dataFolder + "/" + name)
_, _, err = CellsAPI.UploadFile(file, args)
if err == nil {
args1 := new(CellsPivotTablesPostPivotTableStyleOpts)
args1.Name = name
args1.SheetName = sheetName
args1.PivotTableIndex = int32(0)
args1.Style = new(Style)
args1.Style.Custom = "##.#"
args1.Folder = remoteFolder
response, httpResponse, err := CellsAPI.CellsPivotTablesPostPivotTableStyle(args1)
}
if err != nil {
fmt.Println(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.