poi生成excel时换行符(\n)只有鼠标双击才会生效,设置列宽度不生效

时间:2019-09-09 18:07:44   收藏:0   阅读:1059

1、poi生成excel时换行符(\n)只有鼠标双击才会生效

      解决:样式中打开自动换行style.setWrapText(true);

2、设置列宽度不生效sheet.setDefaultColumnWidth((short) 20)

       使用这个函数 sheet.setColumnWidth(i, 30 * 256);,在cell层次设置列宽

3、同理,在row级别设置行高度

        Row row = sheet.createRow(0);
        row.setHeight((short) (2 * 512));

原文链接:https://blog.csdn.net/ccityzh/article/details/81411973

原文:https://www.cnblogs.com/maol986162214/p/11492625.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!