使用apache POI在Excel的消息框中的内容上显示单元格边框

时间:2018-05-10 10:46:56

标签: java excel apache-poi

我得到以下问题,

enter image description here

正如您所看到的,橙色单元格的底部边框正在消息框中显示消息。如何解决这个问题?

 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;

   }

0 个答案:

没有答案