Last active
May 8, 2020 08:17
-
-
Save aspose-cloud/7fa79c30fca0c594c18c0f3937b6bcc9 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(CellsChartsPostWorksheetChartOpts) | |
args1.Name = name | |
args1.SheetName = sheetName | |
args1.ChartIndex = ToInt32(0) | |
args1.Chart = new(Chart) | |
args1.Chart.Name = "NewChart" | |
args1.Folder = remoteFolder | |
response, httpResponse, err := CellsAPI.CellsChartsPostWorksheetChart(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