This example displays the count of DataPilot tables on a sheet.
try { Application application = Application.getInstance(); Spreadsheets spreadsheets = application.getSpreadsheets(); Spreadsheet spreadsheet = spreadsheets.openSpreadsheet("D:\\test.ods", true); Sheets sheets = spreadsheet.getSheets(); Sheet sheet = sheets.item(1); DataPilotTables tables = sheet.getDataPilotTables(); System.out.println(tables.getCount()); } catch(Exception e) { e.printStackTrace(); }
Related information