Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells provides you with the ability to read chart subtitles in ODS files by using the Chart.getSubTitle() property. The following sample code loads the sample ODS file and reads the chart subtitle using the Chart.getSubTitle() property and prints it in the Console Window. Please see the console output of the code given below for reference.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// Source directory
const sourceDir = path.join(__dirname, "data");
// Load excel file containing charts
const filePath = path.join(sourceDir, "SampleChart.ods");
const workbook = new AsposeCells.Workbook(filePath);
// Access first worksheet
const worksheet = workbook.getWorksheets().get(0);
// Access first chart inside the worksheet
const chart = worksheet.getCharts().get(0);
console.log("Chart Subtitle: " + chart.getSubTitle().getText());
Chart Subtitle: Sample Chart Subtitle
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.