def test_cells_charts_post_worksheet_chart_title(self): """ Test case for cells_charts_post_worksheet_chart_title Update chart title """ name = 'myDocument.xlsx' sheet_name = 'Sheet3' chartIndex = 0 title = Title() title.text = "test" folder = "Temp" AuthUtil.Ready(name, folder) result = self.api.cells_charts_post_worksheet_chart_title( name, sheet_name, chartIndex, title=title, folder=folder) pass
def test_cells_charts_post_worksheet_chart_title(self): """ Test case for cells_charts_post_worksheet_chart_title Update chart title """ name = 'myDocument.xlsx' sheet_name = 'Sheet3' chartIndex = 0 title = Title() title.text = "test" folder = "PythonTest" result = AuthUtil.Ready(self.api, name, folder) self.assertTrue(len(result.uploaded) > 0) result = self.api.cells_charts_post_worksheet_chart_title( name, sheet_name, chartIndex, title=title, folder=folder) self.assertEqual(result.code, 200) pass
data_folder = "../../data/" #Instantiate Aspose Storage API SDK storage_apiClient = asposestoragecloud.ApiClient.ApiClient( apiKey, appSid, True) storageApi = StorageApi(storage_apiClient) #Instantiate Aspose Cells API SDK api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True) cellsApi = CellsApi(api_client) #set input file name filename = "Sample_Test_Book.xls" sheetName = "Sheet5" chartIndex = 0 body = Title.Title() body.Text = "Aspose" body.Height = 15 #upload file to aspose cloud storage storageApi.PutCreate(Path=filename, file=data_folder + filename) try: #invoke Aspose.Cells Cloud SDK API to update chart title in a Worksheet response = cellsApi.PostWorksheetChartTitle(name=filename, sheetName=sheetName, chartIndex=chartIndex, body=body) if response.Status == "OK": #download updated workbook from cloud storage