https://issues.apache.org/bugzilla/show_bug.cgi?id=50868
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW --- Comment #2 from [email protected] 2011-03-09 07:21:35 EST --- Nick, you are right. I modified my code as per your suggestion and as you suspected ColumnHelper.getColumn1Based is the source of the slowdown. Here is the modified for loop: ColumnHelper helper = sheet.getColumnHelper(); for(int i = 0; i < numCols; i++) { long startTime = System.currentTimeMillis(); // sheet.setDefaultColumnStyle(i, style); CTCol col = helper.getColumn1Based(i+1, true); if ((i+1)%100 == 0) { long endTime = System.currentTimeMillis(); System.out.printf("Time for setting default column style on %4dth column (ms): %10d%n", (i+1), (endTime-startTime)); } if (col == null) { col = sheet.getCTWorksheet().getColsArray(0).addNewCol(); col.setMin(i+1); col.setMax(i+1); } col.setStyle(style.getIndex()); } -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- 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]
