It seems that you are experiencing an issue where a specific column (“Size”) is missing in the HTML output when exporting an Excel table. This can often be related to the settings used during the export process.
To address this issue, you may want to check the following options in the HtmlSaveOptions class:
ExportActiveWorksheetOnly: Ensure that this property is set to false if you want to export the entire workbook, not just the active worksheet.
ExportHiddenWorksheet: If the column is in a hidden worksheet, make sure this property is set to true to include hidden worksheets in the output.
ExportRowColumnHeadings: If you want to include row and column headings, ensure this property is set to true.
HiddenColDisplayType: This property controls how hidden columns are treated. You can set it to HtmlHiddenColDisplayType.Hidden to include hidden columns in the output but keep them hidden in the HTML.
FormatDataIgnoreColumnWidth: If you want to ignore the column width and export the entire data, set this property to true.
Here is a sample code snippet demonstrating how to set these options:
using Aspose.Cells;
public class ExportExcelToHtml
{
public static void ExportToHtml()
{
Workbook workbook = new Workbook("path/to/your/file.xlsx");
HtmlSaveOptions saveOptions = new HtmlSaveOptions
{
ExportActiveWorksheetOnly = false,
ExportHiddenWorksheet = true,
ExportRowColumnHeadings = true,
HiddenColDisplayType = HtmlHiddenColDisplayType.Hidden,
FormatDataIgnoreColumnWidth = true
};
workbook.Save("output.html", saveOptions);
}
}
Make sure to adjust the file paths and options according to your specific needs. If the issue persists, consider checking the Excel file itself to ensure that the “Size” column is not inadvertently hidden or filtered out.
If you continue to face difficulties, please provide more details or share the sample application you mentioned, as it may help in diagnosing the problem further.
Thanks for the template Excel file and sample app.
After initial testing, I am able to reproduce the issue as you mentioned by using your template Excel file and sample app. I found Excel Table missing column in HTML output as per your attached screenshot.
We require thorough evaluation of the issue. 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): CELLSNET-58376
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.
We are pleased to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v25.5) that we plan to release in the first half of May 2025. You will be notified when the next version is released.
Attached is the updated result for your reference: Bug-1313955-Missing-Column-In-Exported-Excel.xlsx-Table-25.5.zip (2.4 KB)
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.