HTML に保存するときに CrossHideRight でオーバーレイされたコンテンツを非表示にする
Contents
[
Hide
]
考えられる使用シナリオ
Excel ファイルを HTML に保存すると、セル文字列に異なるクロス タイプを指定できます。デフォルトでは、Aspose.Cells は Microsoft Excel に従って HTML を生成しますが、クロス タイプをCrossHideRight、次に、セル文字列と重なっている、または重なっているセルの右側にあるすべての文字列を非表示にします。
Html への保存中に CrossHideRight でオーバーレイされたコンテンツを非表示にする
次のサンプル コードは、サンプル Excel ファイルそしてそれをに保存します出力 HTMLを設定した後HtmlSaveOptions.HtmlCrossStringTypeなのでCrossHideRight.スクリーンショットはその方法を説明していますCrossHideRightデフォルト出力からの出力 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 Excel file | |
Workbook wb = new Workbook(sourceDir + "sampleHidingOverlaidContentWithCrossHideRightWhileSavingToHtml.xlsx"); | |
//Specify HtmlSaveOptions - Hide Overlaid Content with CrossHideRight while saving to Html | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.HtmlCrossStringType = HtmlCrossType.CrossHideRight; | |
//Save to HTML with HtmlSaveOptions | |
wb.Save(outputDir + "outputHidingOverlaidContentWithCrossHideRightWhileSavingToHtml.html", opts); |