SpreadsheetGear
Value Property
See Also  Send Feedback
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.Boolean, System.DateTime, SpreadsheetGear.ValueError, System.Decimal, System.DBNull, object[,] or null.

Syntax

Visual Basic (Declaration) 
Property Value As Object
C# 
object Value {get; set;}

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 Formula to the same string, the only difference being that setting Formula directly is faster. See 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 Formula to get the formula of a cell or use Text to get the formatted value of a cell.

Requirements

Platforms: x86 and x64 versions of Windows 2000, Windows XP, Windows Vista, Windows 7, Windows Server 2003 (including R2) and Windows Server 2008 (including R2). SpreadsheetGear 2009 requires the Microsoft .NET Framework 2.0 and supports .NET 3.0 and .NET 3.5.

See Also

Copyright © 2003-2009 SpreadsheetGear LLC. All Rights Reserved.Help Powered by Innovasys   
SpreadsheetGear is a registered trademark of SpreadsheetGear LLC.
Microsoft, Microsoft Excel and Visual Studio are trademarks or registered trademarks of Microsoft Corporation.