Prevent Exporting Hidden Worksheet Contents on Saving to HTML

Contents
[ ]

Aspose.Cells provides the HtmlSaveOptions.ExportHiddenWorksheet property. By default, it is set to true and hidden worksheets are exported to HTML. If you set it false, Aspose.Cells will not export hidden worksheet contents.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Create workbook object
Workbook workbook = new Workbook(dataDir + "WorkbookWithHiddenContent.xlsx");
// Do not export hidden worksheet contents
HtmlSaveOptions options = new HtmlSaveOptions();
options.ExportHiddenWorksheet = false;
// Save the workbook
workbook.Save(dataDir + "HtmlWithoutHiddenContent_out.html", options);