保存到 HTML 时禁用下层显示评论
Contents
[
Hide
]
可能的使用场景
当您将 Excel 文件保存到 HTML 时,Aspose.Cells 会显示下层条件注释。这些条件注释主要与旧版本的 Internet Explorer 相关,与现代 Web 浏览器无关。您可以在以下链接中详细了解它们。
Aspose.Cells 允许您通过设置HtmlSaveOptions.DisableDownlevelRevealedComments财产给真的.
保存到 HTML 时禁用下层显示评论
以下示例代码显示了HtmlSaveOptions.DisableDownlevelRevealedComments财产。屏幕截图显示了此属性未设置为 true 时的效果。请下载示例 Excel 文件用于此代码和输出 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 | |
//Load sample workbook | |
Workbook wb = new Workbook(sourceDir + "sampleDisableDownlevelRevealedComments.xlsx"); | |
//Disable DisableDownlevelRevealedComments | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.DisableDownlevelRevealedComments = true; | |
//Save the workbook in html | |
wb.Save(outputDir + "outputDisableDownlevelRevealedComments_true.html", opts); |