Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aspose-cloud/0b2caae7acfa3e947b856c07b6e8633a to your computer and use it in GitHub Desktop.
// 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