Cell's style incorrect in html when I using icon set and other condition format at the same time

I set icon set condition format and other condition format at the same range. After I using the workbook’s method ‘setDefaultStyle()’, the cell which with two conditional formats in effect at the same time, its style affected by the default style of the workbook, not by the style of the cell settings in html.

here is the origin excel file:test.7z (7.7 KB)

here is the html before I set default style: before.png (96.4 KB)

here is the html after I set default style(setHorizontalAlignment(TextAlignmentType.LEFT);): after.png (108.5 KB)

here is the excel file after I set default style:afterSetDefaultStyle.7z (9.9 KB)

@xhaixia,
Please share your code snippet with us for our testing. We will reproduce the problem and provide our feedback after analysis.

Here is the test code:
// java code
public class TestMain {
public static void main(String[] args) throws Exception{
Workbook workbook = new Workbook(“E:\AsposeTest\test.xlsx”);
Style style = workbook.getDefaultStyle();
style.setHorizontalAlignment(TextAlignmentType.LEFT);
workbook.save(“E:\AsposeTest\afterSetDefaultStyle.html”);
}
}

@xhaixia,

Please notice, I am able to reproduce the issue as you mentioned by using your template file and sample code. I found cell’s style is incorrect in HTML when using icon set and other conditional formatting at the same time. I have logged a ticket with an id “CELLSJAVA-44000” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@xhaixia

The issue is fixed in v21.11.1
aspose-cells-21.11.1-java.zip (7.4 MB)

The issues you have found earlier (filed as CELLSJAVA-44000) have been fixed in this update. This message was posted using Bugs notification tool