1. After using the following code to generate a XLSX file, if you open that
generated file and click autofilter to sort any of the columns, MS Excel
would crash. However, if you delete the autofilter and using Excel to add it
back again, everything would work just fine. I recreated this scenario on
two boxes and two separated projects.
2. As a user can I file a bug by registering on "ASF Bugzilla"? Where should
I start looking if I want to contribute to the project?
public static void main(String[] args) {
FileOutputStream fileOut =3D null;
try {
XSSFWorkbook wb =3D new XSSFWorkbook();
fileOut =3D new FileOutputStream("c:\\workbook.xlsx");
XSSFSheet sheet =3D wb.createSheet("new sheet");
// Create a row and put some cells in it. Rows are 0 based.
XSSFRow row =3D sheet.createRow((short)0);
// Create a cell and put a value in it.
row.createCell(0).setCellValue("irrelevant");
row.createCell(1).setCellValue("Number");
row.createCell(2).setCellValue("String");
row =3D sheet.createRow((short)1);
row.createCell(1).setCellValue(1);
row.createCell(2).setCellValue("This is a string");
row =3D sheet.createRow((short)2);
row.createCell(1).setCellValue(2);
row.createCell(2).setCellValue("This is a string");
row =3D sheet.createRow((short)3);
row.createCell(1).setCellValue(3);
row.createCell(2).setCellValue("This is a string");
sheet.setAutoFilter(CellRangeAddress.valueOf("B1:C1"));
sheet.autoSizeColumn((short)2);
wb.write(fileOut);
fileOut.close();
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, =
null, ex);
}
}
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/POI-3-7-Generated-Autofilter-crashes-Excel-tp3273626p3273626.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]