在将 Excel 渲染为 PDF 时绘制分析器
Contents
[
Hide
]
在将 Excel 渲染为 PDF 时绘制分析器
如果您的Excel文件已应用切片器,并且您希望导出带有切片器设置的PDF,Aspose.Cells for Node.js via C++现在已支持此功能。只需将带有切片器的Excel文件导出为PDF,生成的PDF将显示切片器的效果。
以下示例代码加载了包含现有切片器的sample Excel file。然后将工作簿保存为output PDF file。以下截图比较了源Excel文件和生成的PDF文件。
示例代码
This file contains hidden or 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
const AsposeCells = require("aspose.cells.node"); | |
// Load sample Excel file containing a table. | |
var workbook = new AsposeCells.Workbook("SampleSlicerChart.xlsx"); | |
// Save the workbook to pdf format. | |
workbook.save("SampleSlicerChart.pdf", AsposeCells.SaveFormat.Pdf); |