java 在写excel的时候报
The maximum column width for an individual cell is 255 characters.
这个错,解决方案
int width = (int) (cellValue.length() * 2.25) >= 30 ? (int) (cellValue.length() * 2.25) : 30;
if(width>255){
width = 254;
}
sheet.setColumnWidth(i, (width * 256));
这样的目的设置单元格的宽度不能超过255
更多推荐
java-poi-excel——The maximum column width for an individual cell is 255 character
发布评论