GroupDocsGists
10/24/2017 - 1:15 PM

Examples-GroupDocs.Assembly.Examples.Java-src-main-java-com-groupdocs-assembly-examples-DataStorage-presentationData.java

// For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-Java
String dataFilePath = CommonUtilities.presentationDataFile+"/Managers Data.pptx";
 
// Do not extract column names from the first row, so that the first row to be treated as a data row.
// Limit the largest row index, so that only the first four data rows to be loaded.
DocumentTableOptions options = new DocumentTableOptions();
options.setMaxRowIndex(3);
 
// Use data of the _second_ table in the document.
DocumentTable table = new DocumentTable(dataFilePath, 1, options);
 
// Check column count and names.
assert table.getColumns().getCount() == 2;
 
// NOTE: Default column names are used, because we do not extract the names from the first row.
assert table.getColumns().get(0).getName().equals("Column1");
assert table.getColumns().get(1).getName().equals("Column2");
 return table;