SpreadsheetGear 2017
Value Property (IRange)






SpreadsheetGear Namespace > IRange Interface : Value Property
Gets the value of the specified range as a System.String, System.Double, System.Boolean, SpreadsheetGear.ValueError, object[,] or null; or sets the value of the specified cell as a System.String, System.Double, System.Int32, System.Int64, System.Int16, System.Char, System.Boolean, System.DateTime, SpreadsheetGear.ValueError, System.Decimal, System.DBNull, object[,] or null.
Syntax
'Declaration
 
Property Value As System.Object
'Usage
 
Dim instance As IRange
Dim value As System.Object
 
instance.Value = value
 
value = instance.Value
System.object Value {get; set;}
read-write property Value: System.TObject; 
function get,set Value : System.Object
__property System.Object* get_Value();
__property void set_Value( 
   System.Object* value
);
property System.Object^ Value {
   System.Object^ get();
   void set (    System.Object^ value);
}
Remarks

An empty cell returns a value of null.

Setting Value to null or to an empty string clears the value from the cell.

Setting Value to a string has the same affect as setting IRange.Formula to the same string, the only difference being that setting IRange.Formula directly is faster. See IRange.Formula for more information on the parsing of string values to numbers, dates, times, errors, logical values and text.

Dates and times are stored internally as a System.Double. Setting Value to a System.DateTime converts the date and/or time to a System.Double. Use IWorkbook.DateTimeToNumber and IWorkbook.NumberToDateTime to convert from a System.DateTime to a number suitable for a cell and back.

The Value property returns the raw data of a cell. Use IRange.Formula to get the formula of a cell or use IRange.Text to get the formatted value of a cell.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IRange Interface
IRange Members
Formula Property
Text Property
Entry Property
ValueType Property
DateTimeToNumber Method
NumberToDateTime Method