poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1757458 - /poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java
Date Wed, 24 Aug 2016 03:54:55 GMT
Author: onealj
Date: Wed Aug 24 03:54:55 2016
New Revision: 1757458

URL: http://svn.apache.org/viewvc?rev=1757458&view=rev
Log:
Update CreatePivotTable with non-deprecated constructor. This closes #36 on github.

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=1757458&r1=1757457&r2=1757458&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 03:54:55 2016
@@ -21,6 +21,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.ss.SpreadsheetVersion;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.DataConsolidateFunction;
 import org.apache.poi.ss.usermodel.Row;
@@ -39,7 +40,8 @@ public class CreatePivotTable {
         //Create some data to build the pivot table on
         setCellData(sheet);
 
-        XSSFPivotTable pivotTable = sheet.createPivotTable(new AreaReference("A1:D4"), new
CellReference("H5"));
+        AreaReference area = new AreaReference("A1:D4", SpreadsheetVersion.EXCEL2007);
+        XSSFPivotTable pivotTable = sheet.createPivotTable(area, new CellReference("H5"));
         //Configure the pivot table
         //Use first column as row label
         pivotTable.addRowLabel(0);
@@ -98,4 +100,4 @@ public class CreatePivotTable {
         Cell cell44 = row4.createCell(3);
         cell44.setCellValue("No");
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message