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. Currently only six types are supported, :date, :time, :float, :integer, :string and :boolean. 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.
43 44 45 |
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 43 def type @type end |