// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Cells-for-Cloud String fileName = "Sample_Pivot_Table_Example.xls"; String sheetName = "Sheet2"; int pivottableIndex = 0; String storage = ""; String folder = ""; Path inputFile = Utils.getPath(GetWorksheetPivotInfoByIndex.class, fileName); try { // Instantiate Aspose Storage API SDK StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); // Instantiate Aspose Words API SDK CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true); // Upload source file to aspose cloud storage storageApi.PutCreate(fileName, "", "", inputFile.toFile()); // Invoke Aspose.Cells Cloud SDK API to get worksheet pivot table // informations by index PivotTableResponse apiResponse = cellsApi.GetWorksheetPivotTable(fileName, sheetName, pivottableIndex, storage, folder); if (apiResponse != null && apiResponse.getStatus().equals("OK")) { PivotTable pivotTable = apiResponse.getPivotTable(); System.out.println("Name" + pivotTable.getPivotTableStyleName()); for (PivotItem item : pivotTable.getBaseFields().get(0).getPivotItems()) { System.out.println("Pivot Item Name :: " + item.getName()); System.out.println("Pivot Item Value :: " + item.getValue()); } System.out.println("Delete Row from a Worksheet, Done!"); } } catch (Exception ex) { ex.printStackTrace(); }