ITabSheet.AdjustCellAddress

Syntax

AdjustCellAddress(Address: String; SourceCell: ITabRange; DestinationCell: ITabRange): String;

Parameters

Address — the cell address, which should be corrected.

SourceCell — the source cell during correction.

DestinationCell — the destination cell during correction.

Description

The AdjustCellAddress method adjusts relative cell address.

Example

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

Var

Tab: ITabSheet;

Begin

Tab := UiTabSheet1.TabSheet;

Tab.Cell(0, 0).Value := 10;

Tab.Cell(0, 1).Value := 20;

Tab.Cell(0, 2).Value := 30;

Tab.Cell(1, 0).Formula := "=A0";

Tab.Cell(1, 1).Formula := Tab.AdjustCellAddress("a0", Tab.Cell(1, 0), Tab.Cell(1, 1));

End Sub Button1OnClick;

As a result for the cell "A1" a formula will be written, setting the same value as in the cell "A0". After this the formula will be corrected for the cell "B1".

See also:

ITabSheet