There is a spreadsheet with a conditional format set to the top 10, corresponding to the first three digits. When calling the save interface to HTML format, it was found that if setExportActiveWorksheetOnly is set to true, the conditional format in the converted HTML is incorrect. If set to false, it is the correct effect
image.png (44.1 KB)
image.png (39.4 KB)
@xhaixia
By using the provided image information to create a sample file for testing on the latest version v24.5, we can obtain the correct results. Please refer to the attachment. result.zip (20.5 KB)
The sample code as follows:
Workbook workbook = new Workbook(filePath + "sample.xlsx");
workbook.save(filePath + "out_java.html");
HtmlSaveOptions options = new HtmlSaveOptions();
options.setExportActiveWorksheetOnly(true);
workbook.save(filePath + "out_java2.html");
If you still have any questions, please provide your sample files and test code, and we will check them soon.