When we convert a single tab spreadsheet to HTML, the result is an HTML table (this is good).
However, when we convert a multi-tab spreadsheet to HTML, the result is a bunch of spans that don’t line up, instead of an HTML table for each tab.
We are setting the following properties in the WebConvertOptions:
webOptions.setEmbedFontResources(true);
webOptions.setUsePdf(false);
webOptions.setFixedLayout(false);
webOptions.setFixedLayoutShowBorders(false);
And are setting the following properties in the SpreadsheetLoadOptions:
spreadsheetOptions.setAutoFitRows(true);
Is there something else we can do to force HTML tables in the result?
@johnnyfunkypants
You reported that when converting a multi-tab XLSX to HTML, the result does not create table elements for each sheet, but instead produces unstructured spans. You are using WebConvertOptions and SpreadsheetLoadOptions with specific settings, but are looking for a way to enforce HTML table generation per sheet.
Based on the available information, there is no direct option in GroupDocs.Conversion to force the creation of HTML tables for each worksheet in a multi-tab XLSX file. The conversion process preserves tabular formatting from Excel when possible, but this behavior may vary depending on the structure and content of the workbook , .
While you’ve set properties like setEmbedFontResources(true) and setAutoFitRows(true), these do not influence whether tables are generated per sheet in the HTML output. The current implementation does not provide a built-in setting to ensure that each worksheet is rendered as a distinct HTML table.
If this functionality is critical for your use case, you might need to implement custom post-processing logic to parse the HTML output and restructure it into tables per sheet. Alternatively, you could explore other conversion approaches or reach out to GroupDocs support for further clarification or potential future enhancements. A support engineer will follow up in this thread if needed.
Hello @johnnyfunkypants ,
We’re sorry that you’ve encountered this issue. Could you please share a sample document so that we can investigate the problem and reproduce it on our side?