Borders, alignment are not picked up when importing HTML to Excel

Hi there,

We are importing HTML into Excel, and it seems that a few CSS styles are not picked up.

For instance Borders and Text-align.

Please find attached an example HTML, ExcelSheet and the converter code that we use.
ExcelConverter.zip (38.3 KB)

Kind regards,
Daan

@jonkeda,

Thanks for the sample files and code segment.

I apologize, but I could not resolve the ReportHtmlResultCollection and IEnvironment types in your code segment, I am not sure about these objects and data. To help us evaluate your issue more precisely and resolve it soon, please provide the complete (runnable) code without any compilation errors. Additionally, please include a screenshot to highlight the problematic areas and your expected Excel file (which you can create manually in MS Excel).

@jonkeda
We can reproduce the issue by testing on the latest version v24.10 using sample files and the following sample code. Found that borders and alignment are not picked up when importing HTML to Excel. Please refer to the attachment. out_net.zip (129.7 KB)

The sample code as follows:

HtmlLoadOptions opts = new HtmlLoadOptions
{
    IgnoreNotPrinted = true,
    AutoFitColsAndRows = true,
    CheckExcelRestriction = false,
    SupportDivTag = false,

    ConvertDateTimeData = true,
    ConvertNumericData = true,

    AutoFitterOptions = new AutoFitterOptions()
    {
        AutoFitMergedCellsType = AutoFitMergedCellsType.EachLine
    },
};

Workbook workbook = new Workbook(filePath + @"Result.html", opts);
workbook.Save(filePath + "out_net.xlsx");

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-57107

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@jonkeda ,

We are pleased to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v24.11) that we plan to release in the first half of November 2024. You will be notified when the next version is released.
Attached is the fixed result for your reference:
out_net.zip (7.7 KB)