フレーム スクリプトとドキュメント プロパティのエクスポートを無効にする
Contents
[
Hide
]
Aspose.Cells は、ワークブックを HTML に変換する際に、フレーム スクリプトとドキュメント プロパティをエクスポートします。をご利用くださいHtmlSaveOptions.setExportFrameScriptsAndProperties()エクスポートを無効にするプロパティ。
フレーム スクリプトとドキュメント プロパティのエクスポートを無効にする
次のサンプル コードでは、フレーム スクリプトとドキュメント プロパティのエクスポートを無効にできます。ワークブックを HTML に変換すると、出力ファイルにはフレーム スクリプトとドキュメント プロパティが含まれなくなります。
これがサンプルコードです。
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"); |