POI excel添加注释

HSSFSheet sheet =workBook.getSheetAt(0);
HSSFPatriarch patr = sheet.createDrawingPatriarch();
// 定义注释的大小和位置,详见文档
HSSFComment comment = patr.createComment(new HSSFClientAnchor(0,0,0,0, (short)4, 2 ,(short) 6, 5));
// 设置注释内容
comment.setString(new HSSFRichTextString("可以在POI中添加注释!"));
posted @ 2012-04-06 17:11  logzh  阅读(6885)  评论(0编辑  收藏  举报