GetChartsFromWorksheet()

IExcelDataWorkbook::GetChartsFromWorksheet(System::String) method

Retrieves a dictionary containing the indexes and names of all charts in the specified worksheet of an Excel workbook.

virtual System::SharedPtr<System::Collections::Generic::IDictionary<int32_t, System::String>> Aspose::Slides::Excel::IExcelDataWorkbook::GetChartsFromWorksheet(System::String worksheetName)=0

Arguments

ParameterTypeDescription
worksheetNameSystem::StringThe name of the worksheet to search for charts.

Return Value

A dictionary where the key is the chart index and the value is the chart name.

Remarks

Example:

System::SharedPtr<IExcelDataWorkbook> wb = System::MakeObject<ExcelDataWorkbook>(testFile);
auto sheetCharts = wb->GetChartsFromWorksheet(u"worksheetName");
for (auto&& chart : sheetCharts)
{
    System::Console::WriteLine(System::Convert::ToString(chart.get_Key()) + u" : " + chart.get_Value());
}

See Also