SpreadsheetGear Namespace > IRange Interface : Value Property (IRange) |
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.Boolean, System.DateTime, SpreadsheetGear.ValueError, System.Decimal, System.DBNull, object[,] or null.
[Visual Basic]
Overridable Property Value As Object
[C#]
virtual object Value {get; set;}
[C++]
__property virtual Object * get_Value();
__property virtual void set_Value(
Object * value
);
[C++/CLI]
virtual property Object ^ Value {
Object ^ get();
void set (Object ^ value);
}
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 Formula to the same string, the only difference being that setting Formula directly is faster.
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.
The Value property returns the raw data of a cell. Use Text to get the formatted value of a cell.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
IRange Interface | IRange Members | Formula Property | Text Property | Entry Property | ValueType Property | DateTimeToNumber Method | NumberToDateTime Method
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.