Rendering Timeline
Possible Usage Scenarios
Aspose.Cells for Node.js via C++ supports the rendering of timeline shape without using office 2013, office 2016, office 2019 and office 365. If you convert your worksheet into an image or you save your workbook to PDF or HTML formats, you will see, timelines are rendered properly.
Rendering Timeline
The following sample code loads the sample Excel file that contains an existing timeline. Get the shape object according to the name of timeline, and then render it into a picture through the Shape.ToImage() method. The flowing image is the output image that shows the rendered timeline. As you can see, timeline has been rendered properly and it looks the same as in the sample Excel file.
Sample Code
const AsposeCells = require("aspose.cells.node"); | |
// Load sample Excel file containing pivot table. | |
var wb = new AsposeCells.Workbook("input.xlsx"); | |
// Access second worksheet. | |
var sheet = wb.getWorksheets().get(1); | |
// Add timeline relating to pivot table | |
var timeline = sheet.getTimelines().get(0); | |
var options = new AsposeCells.ImageOrPrintOptions(); | |
options.setImageType(AsposeCells.ImageType.Png); | |
// Get timeline shape object by timeline's name | |
var timeLineShape = sheet.getShapes().get(timeline.getName()); | |
timeLineShape.toImage("out.png", options); |