SetExternalWorkbook()
Contents
[
Hide
]IChartData::SetExternalWorkbook(System::String) method
Sets external workbook as a data source for the chart. Chart data will be updated from the target workbook.
virtual void Aspose::Slides::Charts::IChartData::SetExternalWorkbook(System::String workbookPath)=0
Arguments
Parameter | Type | Description |
---|---|---|
workbookPath | System::String | Path to the target workbook |
Remarks
auto pres = System::MakeObject<Presentation>();
auto chart = pres->get_Slides()->idx_get(0)->get_Shapes()->AddChart(Aspose::Slides::Charts::ChartType::Pie, 50.0f, 50.0f, 400.0f, 600.0f, true);
auto chartData = chart->get_ChartData();
(System::AsCast<Aspose::Slides::Charts::ChartData>(chartData))->SetExternalWorkbook(u"../../workbook.xlsx");
IChartData::SetExternalWorkbook(System::String, bool) method
Sets external workbook as a data source for the chart.
virtual void Aspose::Slides::Charts::IChartData::SetExternalWorkbook(System::String workbookPath, bool updateChartData)=0
Arguments
Parameter | Type | Description |
---|---|---|
workbookPath | System::String | Path to the target workbook |
updateChartData | bool | If value is false only workbook path will be updated. Chart data won’t be loaded and updated from the target workbook. Can be used when target workbook doesn’t exist or it’s not available. If value is true chart data will be updated from the target workbook. |
Remarks
auto pres = System::MakeObject<Presentation>();
auto chart = pres->get_Slides()->idx_get(0)->get_Shapes()->AddChart(Aspose::Slides::Charts::ChartType::Pie, 50.0f, 50.0f, 400.0f, 600.0f, true);
auto chartData = chart->get_ChartData();
(System::AsCast<Aspose::Slides::Charts::ChartData>(chartData))->SetExternalWorkbook(u"http://path/doesnt/exists", false);
See Also
- Class String
- Class IChartData
- Namespace Aspose::Slides::Charts
- Library Aspose.Slides