Author: onealj Date: Wed Aug 24 04:03:26 2016 New Revision: 1757459 URL: http://svn.apache.org/viewvc?rev=1757459&view=rev Log: make CreatePivotTable self-explaining with better variable names Modified: poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java Modified: poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java?rev=1757459&r1=1757458&r2=1757459&view=diff ============================================================================== --- poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java (original) +++ poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java Wed Aug 24 04:03:26 2016 @@ -40,8 +40,11 @@ public class CreatePivotTable { //Create some data to build the pivot table on setCellData(sheet); - AreaReference area = new AreaReference("A1:D4", SpreadsheetVersion.EXCEL2007); - XSSFPivotTable pivotTable = sheet.createPivotTable(area, new CellReference("H5")); + AreaReference source = new AreaReference("A1:D4", SpreadsheetVersion.EXCEL2007); + CellReference position = new CellReference("H5"); + // Create a pivot table on this sheet, with H5 as the top-left cell.. + // The pivot table's data source is on the same sheet in A1:D4 + XSSFPivotTable pivotTable = sheet.createPivotTable(source, position); //Configure the pivot table //Use first column as row label pivotTable.addRowLabel(0); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org