Link Search Menu Expand Document

SSpread.SetRefStyle Method

Explanation Sets the cell reference style of the formula.
Call format SetRefStyle(style)
Return value None
Arguments style Cell reference style
Specify the following values.
Constant Value Description
$RefStyleDefault 0 Default cell reference
See the absolute coordinates of a matrix of letters and numbers.
You can specify the coordinates of the current matrix with a wild card ( # ).
( A1, B #, # 2 )
$RefStyleA1 1 " A1 " style cell reference
See relative coordinates of a matrix of letters and numbers.
Absolute coordinates can be specified by wildcard ( $ )
( $ A $ 1, $ B, $ 2, $ B2, C $ 5, D4 )
$RefStyleR1C1 2 R1C1 style cell reference
See matrix coordinates using R and row numbers, C and column numbers.
You can refer to the relative position from the current cell by enclosing the numerical value with "[]" .
If you do not specify a number after R or C , it is considered as the current row and column.
( R1C1, RC2, R4C [3], R [2] C4, RC [-2] )
Exception EXT-1 The argument of SetRefStyle is invalid.
Example of use
    Col = 1;
    Row = 1;
    SetRefStyle($RefStyleDefault);
    Formula = "B#";
    SetRefStyle($RefStyleA1);
    Formula = "$B1";
    SetRefStyle($RefStyleR1C1);
    Formula = "RC2";
    
Related item Formula property
GetRefStyle, GetRefStyleReCalcCell methods