フレームスクリプトとドキュメントプロパティのエクスポートを無効にする
Contents
[
Hide
]
Aspose.Cellsは、ワークブックをHTMLに変換する際にフレームスクリプトとドキュメントプロパティをエクスポートします。Aspose.Cells for .NETの8.6.0バージョンでは、フレームスクリプトとドキュメントプロパティのエクスポートをオプションで無効にすることができるようになりました。HtmlSaveOptions.ExportFrameScriptsAndProperties プロパティを使用して、エクスポートを無効にしてください。
フレームスクリプトとドキュメントプロパティのエクスポートを無効にする
以下のサンプルコードを使用すると、フレームスクリプトとドキュメントプロパティのエクスポートを無効にできます。ワークブックを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-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// 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.ExportFrameScriptsAndProperties = false; | |
// Save workbook as HTML | |
w.Save(dataDir + "output.out.html", options); |