aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2017-06-28 22:11:26 +0000
committerPJ Fanning <fanningpj@apache.org>2017-06-28 22:11:26 +0000
commit5d4a4a7f28047195f0f2cd349ffa474a1a4b0297 (patch)
treed883c20bd796548703cbd1ecb8c863b01daa8eb0 /src/examples
parentc80988698fa2acea720b7ed8e1c09b71b23b56f8 (diff)
downloadpoi-5d4a4a7f28047195f0f2cd349ffa474a1a4b0297.tar.gz
poi-5d4a4a7f28047195f0f2cd349ffa474a1a4b0297.zip
Ensure SpreadsheetVersion is set for AreaReferences
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800208 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java b/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java
index a2cc063568..42ff8fbb72 100644
--- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java
+++ b/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java
@@ -19,6 +19,7 @@ package org.apache.poi.xssf.usermodel.examples;
import java.io.FileOutputStream;
import java.io.IOException;
+import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.ss.util.CellReference;
@@ -80,8 +81,8 @@ public class CreateTable {
table.addColumn();
// Set which area the table should be placed in
- AreaReference reference = new AreaReference(new CellReference(0, 0),
- new CellReference(2,2));
+ AreaReference reference = wb.getCreationHelper().createAreaReference(
+ new CellReference(0, 0), new CellReference(2, 2));
table.setCellReferences(reference);
// Save