diff options
author | Javen O'Neal <onealj@apache.org> | 2016-08-24 03:54:55 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-08-24 03:54:55 +0000 |
commit | 63a58593e21485f644d01580bdb194bcc0cb23f1 (patch) | |
tree | 97660351dc58de0a54ce88eb7256400179e249b2 /src/examples | |
parent | 01f4341d23b38c9c05c81c8ed65a43273a049738 (diff) | |
download | poi-63a58593e21485f644d01580bdb194bcc0cb23f1.tar.gz poi-63a58593e21485f644d01580bdb194bcc0cb23f1.zip |
Update CreatePivotTable with non-deprecated constructor. This closes #36 on github.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1757458 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java b/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java index 518ec37f48..6549f482da 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java +++ b/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java @@ -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 +} |