Method: Axlsx::Cell#type
- Defined in:
- lib/axlsx/workbook/worksheet/cell.rb
#type ⇒ Symbol
Note:
If the value provided cannot be cast into the type specified, type is changed to :string and the following logic is applied. :string to :integer or :float, type conversions always return 0 or 0.0 :string, :integer, or :float to :time conversions always return the original value as a string and set the cells type to :string. No support is currently implemented for parsing time strings.
The cell's data type. Changing the type for a cell will recast the value into that type. If no type option is specified in the constructor, the type is automatically determed.
94 95 96 |
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 94 def type defined?(@type) ? @type : :string end |