站内搜索: 请输入搜索关键词

当前页面: 开发资料首页JSP 专题poi设置边框

poi设置边框

摘要: poi设置边框


合并单元格时,只有第一格边框可以设置成为黑色,是怎么回事?


??


你的代码是怎么写的


我的代码:
HSSFCellStyle cs1 = wb.createCellStyle();
cs1.setBorderBottom(HSSFCellStyle.BORDER_THIN);
cs1.setBorderLeft(HSSFCellStyle.BORDER_THIN);
cs1.setBorderRight(HSSFCellStyle.BORDER_THIN);
cs1.setBorderTop(HSSFCellStyle.BORDER_THIN);

HSSFRow titlerow = sheet.createRow(rowIndex);
titlerow.setHeight((short)0x200);
HSSFCell titlecell = titlerow.createCell((short)0);
titlecell.setEncoding(HSSFCell.ENCODING_UTF_16);
titlecell.setCellValue(title);
sheet.addMergedRegion(new Region((short)0,(short)0,(short)0,(short)10));
titlecell.setCellStyle(cs1);

按理说合并成大单元格后应该四周有边框才对,但现在出不来,我到底哪里写错啦?


大家请帮帮我吧~


ok,搞定,呵呵~


↑返回目录
前一篇: jsp页面运行总是出现这样的错误,需刷新一下页面才能正常显示
后一篇: 如何用Timestamp 这个类型定义任意时间,而不是当前时间