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

Free Support Forum - aspose.com

Save as Html adds an Strikethrough on the entire document

Hello Aspose,

When we save the attached excel-file as an html-file with Aspose, every bit of text is shown with an strikethrough and the background turns blue. The change in background also happens when I save it with Excel, so that’s working as intended ? The strikethrough is definitely an bug.

I check the Excel document, but I can’t find the reason it’s showing an blue background and an strikethrough. Do you know which setting is causing this ?

Code:

Workbook lWorkbook = new Workbook( lFilePath );
lWorkbook.save( lSavePath, FileFormatType.HTML );

Z11022-AsposeExample-strikethrough.zip (83.3 KB)

Regards,
Jeroen

@inceptionEhv,

Please notice, I am able to reproduce the issue as you mentioned by converting your template XLSM file to HTML. I found in the output HTML, the text/data in the cells is shown with strikethrough. I have logged a ticket with an id “CELLSJAVA-44384” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@inceptionEhv

There is background and strikethrough in the default style of columns in your source file, when exporting it to html, the style is on the <body> tag(class attribute).

Let me explain that why Excel doesn’t have this issue. When exporting to html, it doesn’t write text-decoration for strikethrough in style. Instead, it uses <s> tag when there is a text with strikethough style.

However, if there is background and underline in the default style of columns(see attachment: Book1.zip (6.5 KB), when exporting to html, Excel will write text-decoration for underline in style. So Excel will have similar issue as Aspose.Cells in this case.

In a word, when exporting to html, some styles may be lost or not right.