Hello,
The attached workbook Border-Zorder.xlsx
, has a worksheet that has different colored vertical and horizontal borders. In Excel, the dark green vertical borders have z-order precedence over the grey horizontal borders (note you may need to zoom in at 400% to see the borders’ z-order). When the worksheet is converted into HTML, the z-order of the border intersections are inconsistent. In some cases, the green borders supersede the grey borders, and in other cases the grey borders supersede the green borders. We expect the border z-order to be consistent with Excel.
This behavior can be seen in the latest Aspose Cells for Java version 20.8, the attached Border-Zorder.xlsx
file and the following Java code:
final String xlFile = [PATH] + "Border-Zorder.xlsx";
final String sheetName = "Sheet1";
Workbook wb = new Workbook(xlFile);
String htmlFile = xlFile.replace(".xlsx", "-" + sheetName + ".html");
Files.deleteIfExists(Paths.get(htmlFile));
wb.save(htmlFile);
System.out.println("Successfully created HTML file: " + htmlFile);
Running the above code should produce the attached Border-Zorder-Sheet1.html
file. If you render the HTML output file in a Browser and zoom in (say 300%) - there are inconsistencies at the border intersections. For example, notice the borders corresponding to cell C4, the top-left intersection is grey, but the top-right intersection is green.
Environment Details:
- Aspose Cells for Java 20.8
- Java version 1.8.0_211
- Windows 10 OS (but also reproducible under Linux).
File description in the Border-Zorder.zip
(9.8 KB) attachment:
- Border-Zorder.xlsx: Excel workbook to be used by the code above.
- Border-Zorder-Sheet1.html: HTML output file produce from the code above on our environment.
Thank you!