Last active
May 8, 2020 08:14
-
-
Save aspose-cloud/0b2caae7acfa3e947b856c07b6e8633a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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