ChartDataWorksheetCollection

ChartDataWorksheetCollection clase

Representa la colección de hojas de cálculo del libro de datos del gráfico.

public sealed class ChartDataWorksheetCollection : IChartDataWorksheetCollection

Propiedades

NombreDescripción
Count { get; }Devuelve el recuento. Solo lectura Int32.
IsSynchronized { get; }Devuelve un valor que indica si el acceso a la colección está sincronizado (seguro para subprocesos). Solo lectura Boolean.
Item { get; }Devuelve la hoja de cálculo por índice.
SyncRoot { get; }Devuelve una raíz de sincronización. Solo lectura Object.

Métodos

NombreDescripción
CopyTo(Array, int)Copia al array especificado.
GetEnumerator()Devuelve un enumerador que itera a través de la colección.

Ejemplos

Ejemplo:

[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;
    }
}

Ver también