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