当我尝试将文本信息保存到单元格中时
for(int i = 0; i < columns.size(); i++){
Row row = sheet.createRow(i + 1);
for(int j = 0; j < columns.get(i).length; j++){
Cell cell = row.createCell((short)j);
cell.setCellValue(new HSSFRichTextString(columns.get(i)[j]));
}
}
我要保存的信息在导出的excel文件中被截断/裁剪,大约在980个字符之后。
我的样式表看起来像:
Sheet sheet = workbook.createSheet("Alerts");
CellStyle style = workbook.createCellStyle();
style.setFillForegroundColor( IndexedColors.GREY_25_PERCENT.getIndex() );
style.setFillPattern( CellStyle.SOLID_FOREGROUND );
sheet.autoSizeColumn(25000);
Row headerRow = sheet.createRow(0);