in thumbnails4j-xlsx/src/main/java/co/elastic/thumbnails4j/xlsx/XlsxToHtmlSerializer.java [289:320]
private void printSheetContent(Formatter html, Sheet sheet){
html.format("<tbody>%n");
int lastRow = Math.min((sheet.getFirstRowNum() + MAX_ROWS - 1), sheet.getLastRowNum());
for(int i = sheet.getFirstRowNum(); i < lastRow; i++){
Row row = sheet.getRow(i);
html.format(" <tr>%n");
if (row != null){
for(int j = firstColumn; j < endColumn-1; j++){
String content = " ";
String attrs = "";
CellStyle style = null;
if (j >= row.getFirstCellNum() && j < row.getLastCellNum()){
Cell cell = row.getCell(j);
if (cell != null){
style = cell.getCellStyle();
attrs = tagStyle(cell, style);
CellFormat cf = CellFormat.getInstance(style.getDataFormatString());
CellFormatResult result = cf.apply(cell);
content = result.text;
if (content.isEmpty()){
content = " ";
}
}
}
html.format(" <td class=\"%s\" %s>%s</td>%n", styleName(style), attrs, content);
}
}
html.format(" </tr>%n");
}
html.format("</tbody>%n");
}