GetChartsFromWorksheet

IExcelDataWorkbook.GetChartsFromWorksheet method

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

public IDictionary<int, string> GetChartsFromWorksheet(string worksheetName)
ParameterTypeDescription
worksheetNameStringThe 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.

Examples

Example:

[C#]
IExcelDataWorkbook wb = new ExcelDataWorkbook(testFile);
var sheetCharts = wb.GetChartsFromWorksheet("worksheetName");
foreach (var chart in sheetCharts)
    Console.WriteLine(chart.Key + " : " + chart.Value);

See Also