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

Free Support Forum - aspose.com

Table style and HTML export

Does Aspose Word preserve table styles when exporting to html?

this is my scenario:

Users will write documents applying a set of predefined styles to every paragraph (and table) of the document.

The user will submit the .doc file to the application, and the application will save it in an html format so it can later be available for a browser.

Later, the web server will replace the exported element of html with a different set of styles suitable for browser visualization.

Actually, it seems that table styles are ignored, i.e. not exported at all in the document

Here the code I use for conversion (input file is a Word file)

Document doc = new Document(inputFile);

HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.Html);

saveOptions.ExportXhtmlTransitional = true;

saveOptions.PrettyFormat = true;

saveOptions.ExportPageSetup = false;

saveOptions.ExportRelativeFontSize = true;

saveOptions.AllowNegativeLeftIndent = true;

saveOptions.ExportHeadersFooters = false;

saveOptions.CssStyleSheetType = CssStyleSheetType.Embedded;

MemoryStream output = new System.IO.MemoryStream();

doc.Save(output, saveOptions);

output.Seek(0, SeekOrigin.Begin);

return output;

Is there a way to have tables marked with a style attribute when exported to html?

Thanks for your help

Gian Paolo


Thanks for your request. Unfortunately, table formatting applied via table styles is converted to direct attributes before converting to HTML. That is why there is no ‘class’ attribute within ‘table’ tag. I logged your request into our defect tracking system. We will let you know once it is resolved.

Best regards,

Is it something you plan to fix in the next release?, if not, can you tell me more or less when do you think it's going to be fixed?

Thanks again for your help

Gian Paolo


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately, the issue is still unresolved, and it is difficult to provide you any reliable estimate regarding the issue at the moment. We will investigate the problem deeply and provide you more information. You will be notified as soon as it is resolved.

Best regards,

The issues you have found earlier (filed as WORDSNET-4450) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.