generalized autoResizeColumns(sheet) function

This commit is contained in:
2019-01-02 16:33:19 +01:00
parent d8e47d1eb0
commit 257def9140

View File

@ -290,4 +290,15 @@ public class WorkbookApp {
return null; 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);
}
}
} }