Save to html: invalid extended borders

Using Aspose Cells for Java, version 17.12.7 (second version with NPE fix, from this post: Save to html: "wrap text" ignored - #7 by shakeel.faiz).

When saving to HTML, Aspose Cells seems to sometimes “extend” the borders of cells.
Take a look at the attached input XLSX and output HTML. In the ZIP file I have also added a PNG screenshot that illustrates the unexpected cell borders.

The large extended line at the top is not there when using Excel 2010 to save, so this seems to be an Aspose Cells bug.
The smaller extended line at the bottom is also there when saving to HTML with Excel 2010. However, I consider this to be a bug in Excel, since the rendering in the Excel application itself does not show such a line. In addition, when inspecting the format for the relevant cells in Excel, no such border properties seem to be actually set. It would be nice if Aspose did not mimic such Excel bugs, or if there was an option to turn this behavior off.

Sample code:

Workbook workbook = new Workbook("input.xlsx");
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.get("S.27.01.01");
worksheets.setActiveSheetIndex(worksheet.getIndex());
HtmlSaveOptions options = new HtmlSaveOptions();
options.setExportActiveWorksheetOnly(true);
options.setExportFrameScriptsAndProperties(false);
options.setExportDocumentProperties(false);
options.setExportWorkbookProperties(false);
options.setExportWorksheetProperties(false);
workbook.save("output.html", options);

Kind regards,
Taras

extended-borders-17.12.7.zip (1.5 MB)

@TarasTielkes,

Thanks for providing us sample code, template file, screenshot and details.

I have evaluated your scenario/case using both Aspose.Cells (using your code) and MS Excel with your template file. I found this is a browser issue or behavior. I guess you might be using Google chrome to open the output HTML file into it. Please try using IE browser type and you will notice there is no issue at all. Mostly, for Aspose.Cells’ generated HTML files, we follow IE standards and specifications.

Hi @Amjad_Sahi,

You are right - after some investigation I was able to trace this back to the following Chromium/Blink bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=2902

That said, did you try to open the generated HTML in Internet Explorer?
When I try to open it with IE8, some of the content inside the tables seems to be missing.

Kind regards,
Taras

@TarasTielkes,

I am using IE10. Could you provide some screenshots comparing MS Excel generated HTML Vs output HTML by Aspose.Cells APIs to highlight the issue (you may encircle the problematic areas in red color), we will check it soon.

Hi @Amjad_Sahi

See attached. Screenshot is from IE8.
ie8.png (63.4 KB)

Kind regards,
Taras

@TarasTielkes,

Thanks for the screenshot.

I think you should upgrade to latest IE versions as it does not show any such issue when opening the file into recent versions, see the screenshot for your reference: