java - 使用 apache POI 在 Excel 中消息框中的内容上出现单元格边框
问题描述
我收到以下问题,
如您所见,橙色单元格的底部边框正在消息框中的消息上方。如何解决这个问题?
private boolean createComments(int iCell,int iRow ,HashMap<String, String> hMap, XSSFSheet sheet, Row row, CellStyle style, String method){
XSSFDrawing patr = sheet.createDrawingPatriarch();
boolean errorcheck = false;
XSSFComment comment1 = null;
String strComments = null;
if(hMap.containsKey(method) && iRow>0){
try{
strComments = hMap.get(method);
System.out.println("inside createComments--SSSSSSSSSSSSSS-- KKKKKKKKKKKKK");
System.out.println("inside 555555555555555 createComments----JJJJJJJJJJ ");
comment1 = patr.createCellComment(new XSSFClientAnchor(500, 800, 1500, 1500, (short)iCell, iRow, (short) iCell + 3, iRow +3));
comment1.setString(new XSSFRichTextString(strComments));
//row.getCell(iCell).setCellComment(comment1 );
row.getCell(iCell).setCellStyle(style);
errorcheck = true;
}catch(Exception e){
}
}
return errorcheck;
}
解决方案
推荐阅读
- python-3.x - 使用python在眼睛图像中检测瞳孔
- regex - 如何使用正则表达式选择最后一次出现的数字而不是 IP 地址,仅从默认 IIS 日志中删除时间
- java - 在键上加入 2 个无界 Pcollections
- python - 如何在基于 Django 类的表单上编辑文本
- python - 打开文件夹时 VS Code 如何处理文件局部性?
- twitter-bootstrap - bootstrap 4 col 与 ml-auto 右对齐
- python - Matplotlib 不会按照它们出现的顺序打印列表中的值
- arrays - PostgreSQL:更新 JSONB 结构中嵌套数组中元素的属性
- perforce-client-spec - 无法在 perforce 中创建简单的客户端
- sql-server - 无法将值 NULL 插入列“intGolferEventYearID”,表不允许空值