See Also

IRange Interface  | IRange Members  | Formula Property

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages SpreadsheetGear The Performance Spreadsheet Component Company 

FormulaR1C1 Property

SpreadsheetGear Namespace > IRange Interface : FormulaR1C1 Property

Gets or sets the value or formula of the cells represented by this IRange using ReferenceStyle.R1C1.

[Visual Basic]
Overridable Property FormulaR1C1 As String
[C#]
virtual string FormulaR1C1 {get; set;}
[C++]
__property virtual string* get_FormulaR1C1(); __property virtual void set_FormulaR1C1(    string* value );
[C++/CLI]
virtual property String^ FormulaR1C1 {    String^ get();    void set (String^ value); }

Remarks

To put a formula in a cell, the first character must be '='. Otherwise, attempts will be made to convert the specified string to a number, date, time, date/time, logical or error value. If none of these succeed, the value will be set in the cell as text.

Example

[C#] 

// Set cells to a formula which referes to the top-left cell in the worksheet. 
range.FormulaR1C1 = "=R1C1"; 
    

[Visual Basic] 

' Set cells to a formula which referes to the top-left cell in the worksheet.
range.FormulaR1C1 = "=R1C1"

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IRange Interface  | IRange Members  | Formula Property

 

 


See our live Excel Reporting, Excel Charting, Excel to DataGrid and Excel Calculation Samples.

Copyright © 2003-2007 SpreadsheetGear LLC. All Rights Reserved.

SpreadsheetGear and Spreadsheet Gear are trademarks of SpreadsheetGear LLC.