Show / Hide Table of Contents

Class WorksheetDataTableCollection

A collection of WorksheetDataTable instances on a worksheet.

Inheritance
System.Object
WorksheetDataTableCollection
Implements
System.Collections.Generic.ICollection<WorksheetDataTable>
System.Collections.Generic.IEnumerable<WorksheetDataTable>
System.Collections.IEnumerable
Namespace: Infragistics.Documents.Excel
Assembly: IgniteUI.Blazor.Documents.Excel.dll
Syntax
public sealed class WorksheetDataTableCollection : Object, ICollection<WorksheetDataTable>, IEnumerable<WorksheetDataTable>, IEnumerable

Properties

Count

Gets the number of data tables in the collection.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

The number of data tables in the collection.

Item[Int32]

Gets the data table at the specified index in the collection.

Declaration
public WorksheetDataTable this[int index] { get; }
Parameters
Type Name Description
System.Int32 index

The zero-based index of the data table to get.

Property Value
Type Description
WorksheetDataTable

The data table at the specified index.

Methods

Add(WorksheetRegion, WorksheetCell, WorksheetCell)

Creates a new data table and adds it to the collection.

Declaration
public WorksheetDataTable Add(WorksheetRegion cellsInTable, WorksheetCell columnInputCell, WorksheetCell rowInputCell)
Parameters
Type Name Description
WorksheetRegion cellsInTable

The region of cells in the data table.

WorksheetCell columnInputCell

The cell used as the column-input cell in the data table.

WorksheetCell rowInputCell

The cell used as the row-input cell in the data table.

Returns
Type Description
WorksheetDataTable

The newly created data table.

Remarks

The input cells specified must be different cell references and at least one must be non-null. See the WorksheetDataTable overview for more information on data tables.

Exceptions
Type Condition
System.ArgumentNullException

cellsInTable is null.

System.ArgumentException

cellsInTable is a region which does not belongs to the worksheet which owns this collection.

System.ArgumentException

columnInputCell is not null but does not belong to the worksheet which owns this collection.

System.ArgumentException

rowInputCell is not null but does not belong to the worksheet which owns this collection.

System.InvalidOperationException

Both columnInputCell and rowInputCell are null.

System.InvalidOperationException

columnInputCell and rowInputCell are the same cell.

System.InvalidOperationException

columnInputCell or rowInputCell are contained in the cellsInTable region.

System.InvalidOperationException

One or more of the interior cells of the cellsInTable region (all cells except the left-most column and top row) is an interior cell of another data table or is a cell in an array formula, and the entire range of that other entity extends outside the interior cells of cellsInTable.

Clear()

Clears all data tables from the collection.

Declaration
public void Clear()
Remarks

Once a data table is removed from the collection, it can no longer be used.

Remove(WorksheetDataTable)

Removes the specified data table from the collection.

Declaration
public bool Remove(WorksheetDataTable dataTable)
Parameters
Type Name Description
WorksheetDataTable dataTable

The data table to remove from the collection.

Returns
Type Description
System.Boolean

True if the dataTable was successfully removed; False if the dataTable was not in the collection.

Remarks

Once a data table is removed from the collection, it can no longer be used.

RemoveAt(Int32)

Removes the data table at the specified index from the collection.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
System.Int32 index

The zero-based index of the data table to remove from the collection.

Remarks

Once a data table is removed from the collection, it can no longer be used.

Implements

System.Collections.Generic.ICollection<>
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable