在保存为HTML时禁用导出框架脚本和文档属性

禁用导出框架脚本和文档属性

以下示例代码允许您禁用导出框架脚本和文档属性。一旦您将工作簿转换为HTML,输出文件将不包含任何框架脚本和文档属性。

以下是示例代码。

// 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");