View definition

def Axlsx::Cell#cell_type_from_value

Defined in github.com/randym/axlsx/lib/axlsx/workbook/worksheet/cell.rb

Description

Note:

This is only used when a cell is created but no :type option is specified, the following rules apply:

  1. If the value is an instance of Date, the type is set to :date

  2. If the value is an instance of Time, the type is set to :time

  3. If the value is an instance of TrueClass or FalseClass, the type is set to :boolean

  4. :float and :integer types are determined by regular expression matching.

  5. Anything that does not meet either of the above is determined to be :string.

Determines the cell type based on the cell value.

cell_type_from_value is referenced in 0 repositories