Aspose.Cells.Examples.CSharp.Articles.RenderingAndPrinting.PreventExportingHiddenContent.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:PreventExportingHiddenContentWhileSavingAsHTML
            // 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);
            // ExEnd:PreventExportingHiddenContentWhileSavingAsHTML
        }
    }
PreventExportingHiddenContent