ExcelをPDFにレンダリングする際にスライサーを描画する
Contents
[
Hide
]
ExcelをPDFにレンダリングする際にスライサーを描画する
スライサーが適用されたExcelファイルがあり、そのスライサー設定を含むPDFファイルにExcelファイルをエクスポートしたい場合、Aspose.Cellsはこれをデフォルトでサポートしています。Excelファイルをスライサー付きでPDFにエクスポートするだけで、生成されたPDFにはスライサーが適用されます。
次のサンプルコードは、既存のスライサーが含まれるsample Excelファイルを読み込みます。その後、ワークブックをoutput PDFファイルとして保存します。次のスクリーンショットは、元のExcelファイルと生成されたPDFファイルを比較しています。
サンプルコード
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 | |
Workbook workbook = new Workbook(sourceDir + "SampleSlicerChart.xlsx"); | |
workbook.Save(outputDir + "SampleSlicerChart.pdf", SaveFormat.Pdf); |