Spread 8.0 Documentation
GetRefStyle Method
Support Options
ActiveX Reference > ActiveX Methods > GetRefStyle Method

Glossary Item Box

GetRefStyle Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Returns the reference style used by the control to represent formulas and custom names.

Syntax

C++

long CSpreadSheet::GetRefStyle ( );

Visual Basic

fpSpread.GetRefStyle( ) As Long

Remarks

The fpSpread control can use relative or absolute references for formulas. The default is absolute references that do not change when copied to another position. The default reference style lets the user indicate the current row or column using the number sign (#).

This method returns information for the entire workbook, including all sheets in the control.

The following values can be returned:

Return Value Constant Description Example
0 RefStyleDefault (Default) Uses letters and numbers for column and row coordinates; letters and numbers represent absolute coordinates, number sign (#) represents the current column or row A1, B#, #2
1 RefStyleA1 Uses letters and numbers for column and row coordinates; uses dollar sign ($) for absolute coordinates $A$1, $B, $2, $B2, C$5, D4
2 RefStyleR1C1 Uses "R" and number for row, "C" and number for column coordinates; [ ] for relative coordinates, "C" or "R" without a number represents the current row or column R1C1, RC2, R4C[3], R[2]C4, RC[-2]

RefStyleA1 provides relative references. The user can also specify absolute references using a dollar sign before the column or row coordinate. This reference style emulates Microsoft Excel.

RefStyleR1C1 uses row and column number coordinates and allows relative references, which are specified by brackets.

Return Type

Current reference style.

See Also

Specifying Cell References

ReCalcCell, SetRefStyle method

DLL Correspondence

SSGetRefStyle function

Copyright © GrapeCity, inc. All rights reserved.