RefreshData()
ChartData::RefreshData() method
Refreshes the chart data by reloading it from the source workbook.
void Aspose::Slides::Charts::ChartData::RefreshData() override
Exceptions
| Exception | Description |
|---|---|
| System::InvalidOperationException | Thrown when the workbook format is not supported, or when ChartData::get_DataSourceType is ChartDataSourceType::ExternalWorkbook and the external workbook cannot be accessed or loaded. |
Remarks
If the chart uses an external workbook, the workbook must be accessible at the time of the call.
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"presentationWithChart.pptx");
auto chart = System::ExplicitCast<IChart>(presentation->get_Slide(0)->get_Shape(0));
chart->get_ChartData()->RefreshData();
See Also
- Class ChartData
- Namespace Aspose::Slides::Charts
- Library Aspose.Slides