hutool BigExcelWriter 下的autoSizeColumnAll异常问题

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