Draw Timeline while rendering Excel to PDF with Node.js via C++
Contents
[
Hide
]
Draw Timeline while rendering Excel to PDF
If you have an Excel file which has a timeline applied to it and you want to export the Excel to PDF with the timeline settings, Aspose.Cells for Node.js via C++ now supports this by default. You simply export the Excel file with a timeline to PDF, and the generated PDF will show the timeline applied.
The following sample code loads the sample Excel file that contains an existing timeline. It then saves the workbook as output PDF file. The following screenshot compares the source Excel file and the generated PDF file.

Sample Code
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "input.xlsx");
// Load sample Excel file
const workbook = new AsposeCells.Workbook(filePath);
// Save file to pdf
workbook.save("out.pdf", AsposeCells.SaveFormat.Pdf);