Show contents 

Tab > Tab Assembly Interfaces > ITabSheet > ITabSheet.AdjustCellAddress

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(00).Value := 10;
    Tab.Cell(01).Value := 20;
    Tab.Cell(02).Value := 30;
    Tab.Cell(10).Formula := "=A0";
    Tab.Cell(11).Formula := Tab.AdjustCellAddress("a0", Tab.Cell(10), Tab.Cell(11));
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