If I take the "New, generic SS Usermodel Code" at
http://poi.apache.org/spreadsheet/converting.html and add to it the
following section:
if (wb instanceof XSSFWorkbook) {
XSSFSheet sheet = (XSSFSheet) s;
Comment comment = sheet.createComment();
comment.setString(createHelper.createRichTextString("Comment " + cellnum));
c2.setCellComment(comment);
}
at the end of the innermost for(int cellnum = 0; cellnum < 10; cellnum
+= 2) loop, the generated workbook.xlsx file cannot be opened by
Excel. In fact, just calling createComment() and commenting out the
following two lines also corrupts the file.
Am I doing something wrong with the comment?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]