在将 Excel 渲染到 PDF 时绘制切片器
Contents
[
Hide
]
在将 Excel 渲染到 PDF 时绘制切片器
如果您有一个应用了切片器的 Excel 文件,并且您想要使用切片器设置将 Excel 导出到 PDF,则 Aspose.Cells 现在默认支持此功能。您只需将带有切片器的 Excel 文件导出到 PDF,生成的 PDF 将显示应用的切片器。
下面的示例代码加载示例 Excel 文件包含一个现有的切片器。然后将工作簿另存为输出 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); |