https://issues.apache.org/bugzilla/show_bug.cgi?id=56440
--- Comment #2 from ki <[email protected]> --- thx for answer me. Juet the simple file whth the FormulaCell[=IF((COUNT(U224,U225,U226,U227))>0,ROUND(SUM(U224,U225,U226,U227),6),0)]. The file has 2000rows and 100 cols,size is 1.3 MB,not ON ie. to delete 20rows for xlsx cost 40sec,but xls is 1sec.... the test soure is under.. import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; public class ReadExcelSheetTest { public static void main(final String[] args) throws InvalidFormatException { try { String templatePath = "C:\\temp\\test.xlsx"; FileInputStream fis = null; fis = new FileInputStream(templatePath); Workbook workbook = WorkbookFactory.create(fis); Sheet sheet = workbook.getSheet("a"); for (int i = 20; i >= 1; i--) { Row row = sheet.getRow(i); if (row != null) { sheet.removeRow(row); System.out.println("-----" + i); } } workbook.write(new FileOutputStream("C:\\temp\\3.xlsx")); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
