aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-05-09 05:25:29 +0000
committerJaven O'Neal <onealj@apache.org>2016-05-09 05:25:29 +0000
commitcb23ca952bc61671b9ff566e9420bbce5f6e4596 (patch)
tree818e0582ca9a77789651a27452bf3fb2c3050f89 /src/examples
parent38e137f9a0c33e8dd35a1d1205acfcce95fef7b4 (diff)
downloadpoi-cb23ca952bc61671b9ff566e9420bbce5f6e4596.tar.gz
poi-cb23ca952bc61671b9ff566e9420bbce5f6e4596.zip
bug 59443: use Comment.setAddress when changing both row and column of cell comment address
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1742880 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java b/src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java
index 252d7488a8..a94e58a342 100644
--- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java
+++ b/src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java
@@ -17,6 +17,7 @@
package org.apache.poi.xssf.usermodel.examples;
import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.IOException;
@@ -68,8 +69,7 @@ public class CellComments {
comment2.setString(str2);
comment2.setAuthor("Apache POI");
- comment2.setColumn(2);
- comment2.setRow(2);
+ comment2.setAddress(new CellAddress("C3"));
String fname = "comments.xlsx";
FileOutputStream out = new FileOutputStream(fname);