スライサーの削除
Contents
[
Hide
]
可能な使用シナリオ
Microsoft Excelでスライサーを削除する場合は、それを選択して削除ボタンを押してください。同様に、Aspose.Cells APIを使用して削除したい場合は、Worksheet.Slicers.Remove() メソッドを使用してください。これにより、ワークシートからスライサーを削除します。
スライサーの削除
Aspose.Cellsはスライサーの形状のレンダリングをサポートしています。ワークシートを画像に変換したり、ワークブックをPDFや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 containing slicer. | |
Workbook wb = new Workbook("sampleRemovingSlicer.xlsx"); | |
// Access first worksheet. | |
Worksheet ws = wb.Worksheets[0]; | |
// Access the first slicer inside the slicer collection. | |
Aspose.Cells.Slicers.Slicer slicer = ws.Slicers[0]; | |
// Remove slicer. | |
ws.Slicers.Remove(slicer); | |
// Save the workbook in output XLSX format. | |
wb.Save("outputRemovingSlicer.xlsx", SaveFormat.Xlsx); |