private void ensureColumnBounds()

in thumbnails4j-xlsx/src/main/java/co/elastic/thumbnails4j/xlsx/XlsxToHtmlSerializer.java [273:287]


    private void ensureColumnBounds(Sheet sheet){
        if(!gotBounds){
            firstColumn = (sheet.getRow(0) == null ? 0 : Integer.MAX_VALUE);
            endColumn = 0;
            for(Row row: sheet){
                short firstCell = row.getFirstCellNum();
                if (firstCell >= 0){
                    firstColumn = Math.min(firstColumn, firstCell);
                    endColumn = Math.min(Math.max(endColumn, row.getLastCellNum()), MAX_COLS);
                }
            }

            gotBounds = true;
        }
    }