We generate HTML from Excel XLSX file while copying styles using Java (Aspose.Cells). It is found that the effect is abnormal when converting to HTML. It is normal to convert to PDF or excel format
image.png (18.0 KB)
image.png (19.9 KB)
this is the code:
Workbook workbook = new Workbook("D://Aspose//EPPR_48315//EPPR_48315.xlsx");
Worksheet worksheet = workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();
Cell cell = cells.get("C4");
Style style = cell.getStyle();
// Range C4:C10
Range r = cells.createRange(3,2,7,1);
r.setStyle(style);
workbook.save("D://Aspose//EPPR_48315//EPPR_48315/EPPR_48315_201.html", SaveFormat.HTML);
workbook.save("D://Aspose//EPPR_48315//EPPR_48315/EPPR_48315_201.xlsx", SaveFormat.EXCEL_97_TO_2003);
workbook.save("D://Aspose//EPPR_48315//EPPR_48315/EPPR_48315_201.pdf", SaveFormat.PDF);
this is the excel file and result:
EPPR_48315.zip (64.7 KB)