Worksheets

ChartDataWorkbook.Worksheets property

获取工作表的集合。

public IChartDataWorksheetCollection Worksheets { get; }

例子

示例:

[C#]
using (Presentation pres = new Presentation())
{
    IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Pie, 50, 50, 400, 500);
    IChartDataWorkbook workbook =  chart.ChartData.ChartDataWorkbook;
    foreach (IChartDataWorksheet worksheet in workbook.Worksheets)
    {
        string worksheetName = worksheet.Name;
    }
}

也可以看看