IPivotTable.Cell

Syntax

Cell(Row: Integer; Column: Integer): Variant;

Parameters

Row. Row index.

Column. Column index.

Description

The Cell property determines cell value of the table, index of row and column of which are passed by input parameters.

Comments

Edit mode must be active for changing the table data. The Edit method is used to switch to the edit mode.

Example

Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for TabSheetBox.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

OLAP: IEaxAnalyzer;

Pivot: IPivot;

Table: IPivotTable;

i, j: Integer;

Begin

OLAP := UiErAnalyzer1.ErAnalyzer;

Pivot := OLAP.Pivot;

Table := Pivot.ObtainTable;

Table.Edit;

For i := 0 To Table.RowCount - 1 Do

For j := 0 To Table.ColumnCount - 1 Do

Table.Cell(i, j) := Math.RandBetweenI(100, 500);

End For;

End For;

Table.Post;

Pivot.Refresh;

End Sub Button1OnClick;

After executing the example clicking the button generates random values for all table cells. Updated data is saved in a data source.

See also:

IPivotTable