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.SubTitle property. The following sample code loads the sample ODS file and reads the chart subtitle using Chart.SubTitle property and prints it in the Console Window. Please see the console output of the code given below for reference.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
using namespace std;
int main()
{
Aspose::Cells::Startup();
// Source directory path
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
// Load excel file containing charts
Workbook workbook(srcDir + u"SampleChart.ods");
// Access first worksheet
Worksheet worksheet = workbook.GetWorksheets().Get(0);
// Access first chart inside the worksheet
Chart chart = worksheet.GetCharts().Get(0);
// Print chart subtitle
cout << "Chart Subtitle: " << chart.GetSubTitle().GetText().ToUtf8() << endl;
Aspose::Cells::Cleanup();
return 0;
}
Chart Subtitle: Sample Chart SubtitleAnalyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.