We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Inconsistent Border Precedence (Z-order) on HTML Output

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!

@oraspose,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-43264 - Inconsistent Border Precedence (Z-order) on HTML Output

@oraspose,

We have tested the resultant html using Chrome, Edge and Firefox. Only Firefox can reproduce the issue. We think it is not an issue. It is firefox rendering issue. If you export the file to html via MS-Excel. you will get the same results.