Skip to main content

TdxSpreadSheetTableView.ForEachCell(string,TdxSpreadSheetTableViewForEachCellProc,Boolean) Method

Performs a specific set of actions on all populated cells within a specific portion of the Table View worksheet.

Declaration

procedure ForEachCell(const AArea: string; AProc: TdxSpreadSheetTableViewForEachCellProc; AGoForward: Boolean = True); overload;

Parameters

Name Type
AArea string
AProc TdxSpreadSheetTableViewForEachCellProc
AGoForward Boolean

Remarks

This procedure applies a set of actions implemented as an anonymous procedure passed as the AProc parameter to all populated cells within the designated area.

The first overloaded ForEachCell procedure variant applies the specified routine to all cell objects within the worksheet (that is, all populated cells within the area returned by the Dimensions property):

The second and third overloaded variants allow you to limit the cell range affected by the specified routine with the area passed as the AArea parameter:

By default, all ForEachCell procedures process populated cells one by one from left to right and row by row from top to bottom. To reverse the default cell processing order, pass False as the optional AGoForward parameter provided by the second and third overloaded variants:

The third overloaded variant implements the IdxSpreadSheetViewData interface and accepts a TdxSpreadSheetViewForEachCellProc anonymous procedure which allows addressing populated cells in ExpressSpreadSheet worksheets and ExpressQuantumGrid data providers. The ExpressSpreadSheet formula engine provides the formula expression and conditional formatting functionality by calling this variant.

Refer to the How to Customize All Cell Objects at Once topic for detailed information on the practical use of the first and second overloaded ForEachCell procedure variants.

Note

To apply the same set of actions implemented as an anonymous procedure to all populated cells within a particular row object, call its EnumCells procedure.

See Also