in thumbnails4j-xlsx/src/main/java/co/elastic/thumbnails4j/xlsx/XlsxToHtmlSerializer.java [128:175]
private void printStyles(Formatter html){
html.format(".excelDefaults {\n" +
" background-color: white;\n" +
" color: black;\n" +
" text-decoration: none;\n" +
" direction: ltr;\n" +
" text-transform: none;\n" +
" text-indent: 0;\n" +
" letter-spacing: 0;\n" +
" word-spacing: 0;\n" +
" white-space: pre-wrap;\n" +
" unicode-bidi: normal;\n" +
" background-image: none;\n" +
" text-shadow: none;\n" +
" list-style-image: none;\n" +
" list-style-type: none;\n" +
" padding: 0;\n" +
" margin: 0;\n" +
" border-collapse: collapse;\n" +
" vertical-align: bottom;\n" +
" font-style: normal;\n" +
" font-family: sans-serif;\n" +
" font-variant: normal;\n" +
" font-weight: normal;\n" +
" font-size: 10pt;\n" +
" text-align: right;\n" +
" table-layout: fixed;\n" +
" word-wrap: break-word;\n" +
" overflow-wrap: break-word;\n" +
" }\n" +
"\n" +
" .excelDefaults td {\n" +
" padding: 1px 5px;\n" +
" }");
Set<CellStyle> seen = new HashSet<>();
for(int i = 0; i<workbook.getNumberOfSheets(); i++){
Sheet sheet = workbook.getSheetAt(i);
for(Row row : sheet){
for(Cell cell : row){
CellStyle style = cell.getCellStyle();
if (!seen.contains(style)){
printStyle(html, style);
seen.add(style);
}
}
}
}
}