Gets or sets the cell data.
Namespace: MindFusion.Spreadsheet.Wpf
Assembly: MindFusion.Spreadsheet.Wpf
C# Copy Code |
---|
public Object Data { get; set; } |
Visual Basic Copy Code |
---|
Public Property Data As Object |
An object representing the cell data.
If this property is set to null (Nothing in Visual Basic), this is equivalent to clearing the cell via Clear. If the specified value is a string, starting with an equal sign '=', it is interpreted as a formula. To specify a string, starting with an equal sign as cell data, prefix the string with a single apostrophe '''.
If this property is set to a string, Spreadsheet for WPF attempts to parse the string into one of the following types, according to the culture of the parent workbook: number (raw number, percentage, or currency), time, date, or logical. If the value cannot be converted, the value is accept as a string. The effective value of the cell can be subsequently retrieved through the Value property.
The following example sets the data of an existing cell.
C# Copy Code |
---|
cell.Data = "1/6/2013"; |
Visual Basic Copy Code |
---|
cell.Data = "1/6/2013" |