有人可以向我解释在创建单元格评论时如何正确使用锚点吗?我的工作正常,但电子表格发生了变化,我无法让我的单元格评论出现。这是我使用的有效代码:
Comment c = drawing.createCellComment (new HSSFClientAnchor(0, 0, 0, 0, (short)4, 2, (short)6, 5));
这主要是通过实验发现的。查看它的 api 并不能使它更清晰。
根据快速入门指南,我还尝试了以下方法,但没有成功:
ClientAnchor anchor = chf.createClientAnchor();
Comment c = drawing.createCellComment(anchor);
c.setString(chf.createRichTextString(message));