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

Free Support Forum - aspose.com

Excel comment lost when saving as HTML


In Excel when saving in HTML the comments are kept as a link.

We notice that if we save this same Excel file in HTML, the comments are not kept.

Is there a method to keep these comments?

Is an Aspose evolution planned?

I am attaching the code for reproduction.


element.zip (56.6 KB)


You need to specify relevant Boolean attributes on in HtmlSaveOptions while rendering to HTML file format. See the updated sample code segment that works fine as I tested:
Sample code:

License license = new License();

string dataDir = @"D:\Temp\AsposeTest\Cells\";
Workbook workbook = new Workbook(dataDir + "commentaire.xlsx");

System.IO.FileInfo file = new System.IO.FileInfo(dataDir + @"\outputDocument\");
if (!file.Directory.Exists)

HtmlSaveOptions options = new HtmlSaveOptions();
options.IsExportComments = true;

workbook.Save(file + @"\out.xlsx");
workbook.Save(file + @"\out.html", options);
workbook.Save(file + @"\out.pdf", SaveFormat.Pdf); 

Hope, this helps a bit.