Link Search Menu Expand Document

SSpread.GetRefStyle Method

Explanation Gets the cell reference style of the formula currently in use.
Call format GetRefStyle()
Return value Cell reference style
Returns the following values:
Constant Value Description
$RefStyleDefault 0 Default cell reference
See the absolute coordinates of a matrix of letters and numbers.
The coordinates of the current matrix can be specified with a wildcard ( # ).
( A1, B #, # 2 )
$RefStyleA1 1 " A1 " style cell reference
See relative coordinates of a matrix of letters and numbers.
Absolute coordinates can be specified with a 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.
The relative position from the current cell can be referred by enclosing the numerical value with "[]" .
If no number is specified after R or C, it is considered as the current row and column.
( R1C1, RC2, R4C [3], R [2] C4, RC [-2] )
Arguments None
Exception None
Example of use
    var ret = GetRefStyle();
    var style = "";
    switch (ret) {
        case $RefStyleDefault:
            style = "Default";
            break;
        case $RefStyleA1:
            style = "A1";
            break;
        case $RefStyleR1C1:
            style = "R1C1";
            break;
    }
    MessageBox("The reference style is " + style + " style");
    
Related item Formula property
ReCalcCell, SetRefStyle methods