HTMLへの保存時にDownlevel表示されたコメントを無効にする
可能な使用シナリオ
ExcelファイルをHTMLに保存すると、Aspose.CellsはDownlevel条件付きコメントを表示します。これらの条件付きコメントは、古いバージョンのInternet Explorerに関連することが多く、現代のWebブラウザには関係ありません。詳細については、次のリンクで詳しく説明しています。
Aspose.Cellsを使用して、HtmlSaveOptions.DisableDownlevelRevealedCommentsプロパティをtrueに設定することで、これらのDownlevel Revealed Commentsを排除できます。
HTML への保存時にダウンレベルの表示されたコメントを無効にする
以下のサンプルコードは、HtmlSaveOptions.DisableDownlevelRevealedCommentsプロパティの使用例を示しています。このプロパティをtrueに設定しない場合の効果を示すスクリーンショットをダウンロードしてください。
サンプルコード
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Load sample workbook | |
Workbook wb = new Workbook(srcDir + "sampleDisableDownlevelRevealedComments.xlsx"); | |
// Disable DisableDownlevelRevealedComments | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.setDisableDownlevelRevealedComments(true); | |
// Save the workbook in html | |
wb.save(outDir + "outputDisableDownlevelRevealedComments_true.html", opts); |