diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-07-20 13:13:28 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-07-20 13:13:28 +0000 |
commit | 590e49c143e1773f037e46eb650286f391be79bb (patch) | |
tree | 406e596d15e3955bb2b5f6701c73e0ac47e0ea67 /poi-examples | |
parent | 369681f7f9c08124b7af2d75cf531aa08646bc05 (diff) | |
download | poi-590e49c143e1773f037e46eb650286f391be79bb.tar.gz poi-590e49c143e1773f037e46eb650286f391be79bb.zip |
[bug-66173] add new XSSFSheet createSplitPane method to avoid bug in existing method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902876 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
2 files changed, 4 insertions, 2 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java index 54c3879e41..14869874ef 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java @@ -24,6 +24,7 @@ import java.io.IOException; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.PaneType; import org.apache.poi.ss.usermodel.Sheet; public class SplitAndFreezePanes { @@ -41,7 +42,7 @@ public class SplitAndFreezePanes { // Freeze the columns and rows (forget about scrolling position of the lower right quadrant). sheet3.createFreezePane(2, 2); // Create a split with the lower left side being the active quadrant - sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); + sheet4.createSplitPane(2000, 2000, 0, 0, PaneType.LOWER_LEFT); try (FileOutputStream fileOut = new FileOutputStream("workbook.xls")) { wb.write(fileOut); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java index 4a8afee879..04698abdde 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java @@ -20,6 +20,7 @@ package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.ss.usermodel.PaneType; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -42,7 +43,7 @@ public class SplitAndFreezePanes { // Freeze the columns and rows (forget about scrolling position of the lower right quadrant). sheet3.createFreezePane(2, 2); // Create a split with the lower left side being the active quadrant - sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); + sheet4.createSplitPane(2000, 2000, 0, 0, PaneType.LOWER_LEFT); try (FileOutputStream fileOut = new FileOutputStream("splitFreezePane.xlsx")) { wb.write(fileOut); |