Disable Exporting Frame Scripts and Document Properties
Contents
[
Hide
]
Aspose.Cells exports frame scripts and document properties while converting a workbook into HTML. The 8.6.0 version of Aspose.Cells for Java introduces an option that allows you optionally disable exporting frame scripts and document properties. Please use the HtmlSaveOptions.setExportFrameScriptsAndProperties() property to disable the export.
Disable exporting frame scripts and document properties
The following sample code allows you to disable exporting frame scripts and document properties. Once you convert a workbook into HTML, the output file will not contain any frame scripts and document properties.
Here is a sample code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(DisableExporting.class); | |
// Open the required workbook to convert | |
Workbook w = new Workbook(dataDir + "Sample1.xlsx"); | |
// Disable exporting frame scripts and document properties | |
HtmlSaveOptions options = new HtmlSaveOptions(); | |
options.setExportFrameScriptsAndProperties(false); | |
// Save workbook as HTML | |
w.save(dataDir + "output.html", options); | |
System.out.println("File saved"); |