hutool BigExcelWriter 下的autoSizeColumnAll异常问题
时间:2019-12-13 21:09:28
收藏:0
阅读:818
autoSizeColumnAll
java.lang.IllegalStateException: Could not auto-size column. Make sure the column was tracked prior to auto-sizing the column.
SXSSFSheet sheet = (SXSSFSheet)writer.getSheet();
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
sheet.trackAllColumnsForAutoSizing();
//列宽自适应
writer.autoSizeColumnAll();原文:https://www.cnblogs.com/singworld/p/12037138.html
评论(0)