generalized autoResizeColumns(sheet) function
This commit is contained in:
@ -290,4 +290,15 @@ public class WorkbookApp {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void autoResizeColumns(Sheet sheet) {
|
||||
int maxColumn = sheet.getRow(0).getPhysicalNumberOfCells();
|
||||
for (int currentColumn = 0; currentColumn < maxColumn; currentColumn++) {
|
||||
if (LOGGER.isTraceEnabled()) {
|
||||
LOGGER.trace("Auto resize column {}/{}", currentColumn, maxColumn);
|
||||
}
|
||||
|
||||
sheet.autoSizeColumn(currentColumn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user