Spread Windows Forms 9.0 Product Documentation
Understanding How Cell Types Display and Format Data

The value of the Text property contains the formatted data as displayed in the cell; the value of the Value property contains the unformatted data as saved in the model. You can use the SheetView GetText and GetValue methods to obtain the contents of the cell, regardless of cell type.

The following table lists the editable cell types, and how each cell type works with the data, whether formatted (Text) or unformatted (Value).

Editable Cell Type Sample Input Formatted Data Unformatted Data
CurrencyCellType "$10,000.00" "$10,000.00" 10000.00
DateTimeCellType "10/29/2002" "10/29/2002" DateTime object of Tuesday, October 29, 2002 12:00:00 AM
GeneralCellType Any data String of that data Depends on whether DateTime, Boolean, or Text returns the DateTime object, the Boolean value, or the Text value
MaskCellType "123-45-6789" "123-45-6789" "123456789"
NumberCellType "10000.00" "10000.00" 10000.00
PercentCellType "15%" "15%" 0.15
RegularExpressionCellType "99-999-9999" "99-999-9999" "99-999-9999"
TextCellType Any text String of that text String of that text

The following table lists the graphical cell types, and how each cell type works with the Text and Value properties.

Graphical Cell Type Sample Input Text Data Value Data
BarCodeCellType Picture as data N/A N/A
ButtonCellType two-state True "1" True
  False "0" False
  Not set looks false Empty string False
CheckBoxCellType two-state True (checked) "True" 1
  False (unchecked) "False" 0
  Not set looks false Empty string False
CheckBoxCellType three-state True (checked) "1" 1
  False (unchecked) "0" 0
  Indeterminate (gray) "2" 2
  Not set looks false Empty string 0
ColorPickerCellType Selected color Color name Color name
ComboBoxCellType and MultiColumnComboBoxCellType Any item Text of selected item Text of selected item or index of selected item (see EditorValue property)
  Nothing selected Empty string Null
HyperLinkCellType any text Array of Boolean values: "True" (for visited link) or "False" (for not visited) Array of Boolean values: "True" (for visited link) or "False" (for not visited)
ImageCellType Picture as data N/A N/A
ListBoxCellType Array Array Array
MultiOptionCellType Any item selected Text of selected item Index of selected item (numeric)
  Nothing selected Empty string Null
ProgressCellType 15, between 10 and 20 "50%" (string representation of numeric value) 15 (actual value)
RichTextCellType String in rich text format String in rich text format String in rich text format
SliderCellType 4, between 0 and 10 "4" (string representation of numeric value) 4

For information on other aspects of cell display, refer to Resizing a Cell to Fit the Data.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback