Problem with font-family extracting HTML from xlsx

Hello,
I need to extract HTML representing a named area from an xlsx file.
The resulting HTML expresses font-family in the form “font-family:Font1,Font2;
The cases a tried Font2 was always sans-serif.
I use different font in the area, but Font1 changes according to my use, Font2 is always the same sans-serif;
This causes me problem when I uses this HTML.
Is there a way to avoid this and obtain font-family:Font1;

@federico.mameli,

Could you please provide sample files (source Excel file, output file, etc.), sample (runnable) code, and some screenshots to demonstrate the issue you have talked about? We will then evaluate your issue and assist you accordingly.

P.S. Please zip the resource files before attaching.

ExtractHTML.zip (20.6 KB)

Here you can find all.
In out.html you can find for example:
font-family:Pacifico,sans-serif;
and I’d need
font-family:Pacifico;

Thanks,
Federico

@federico.mameli,

Thanks for the template XLSX file.

I was able to reproduce the issue as you mentioned by using your template XLSX file and code segment. I found an issue with font-family definition when exporting HTML from XLSX. By the way, when I tried to accomplish the task (I exported the printable area to HTML (“Web Page”)) via MS Excel manually, it also mentioned “Calibri, sans-serif;” for font-family definitions for some styles. Anyways, we need to evaluate your issue in details and try to figure it out as per your requirements.

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): CELLSJAVA-45957

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.

@federico.mameli ,

We are pleased to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v24.5) that we plan to release in the first half of May 2024. You will be notified when the next version is released.

Pelease use HtmlSaveOptions.setNoDefaultFontName(true); after the next verion is released.

Attached is the result after fix for your reference:
output.zip (3.1 KB)

Perfect,
Thanks

@federico.mameli,

Thank you for your feedback, it is really appreciated.