将 Excel 渲染到 PDF 时绘制时间轴
Contents
[
Hide
]
将 Excel 渲染到 PDF 时绘制时间轴
如果您有一个应用了时间线的 Excel 文件,并且您想要使用时间线设置将 Excel 导出到 PDF,Aspose.Cells for Java 现在默认支持它。您只需将带有时间线的 Excel 文件导出到 PDF,生成的 PDF 将显示应用的时间线。
下面的示例代码加载示例 Excel 文件包含一个现有的时间表。然后将工作簿另存为输出 PDF 文件.以下屏幕截图比较了源 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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Load sample Excel file | |
Workbook wb = new Workbook("input.xlsx"); | |
// Save file to pdf | |
wb.save("out.pdf"); |