package org.apache.poi.xssf.usermodel.examples;\r
\r
import org.apache.poi.ss.usermodel.*;\r
+import org.apache.poi.ss.util.CellAddress;\r
import org.apache.poi.xssf.usermodel.XSSFWorkbook;\r
\r
import java.io.IOException;\r
\r
comment2.setString(str2);\r
comment2.setAuthor("Apache POI");\r
- comment2.setColumn(2);\r
- comment2.setRow(2);\r
+ comment2.setAddress(new CellAddress("C3"));\r
\r
String fname = "comments.xlsx";\r
FileOutputStream out = new FileOutputStream(fname);\r
/**
* Return defines position of this anchor in the sheet.
+ * The anchor is the yellow box/balloon that is rendered on top of the sheets
+ * when the comment is visible.
+ *
+ * To associate a comment with a different cell, use {@link #setAddress}.
*
* @return defines position of this anchor in the sheet
*/