Class Excelx
In: lib/roo/excelx.rb
Parent: GenericSpreadsheet

Methods

cell   celltype   excelx_format   excelx_type   excelx_value   formula   formula?   formulas   new   sheets   to_s  

Constants

FORMATS = { 'General' => :float, '0' => :float, '0.00' => :float, '#,##0' => :float, '#,##0.00' => :float, '0%' => :percentage, '0.00%' => :percentage, '0.00E+00' => :float, '# ?/?' => :float, #??? TODO: '# ??/??' => :float, #??? TODO: 'mm-dd-yy' => :date, 'd-mmm-yy' => :date, 'd-mmm' => :date, 'mmm-yy' => :date, 'h:mm AM/PM' => :date, 'h:mm:ss AM/PM' => :date, 'h:mm' => :time, 'h:mm:ss' => :time, 'm/d/yy h:mm' => :date, '#,##0 ;(#,##0)' => :float, '#,##0 ;[Red](#,##0)' => :float, '#,##0.00;(#,##0.00)' => :float, '#,##0.00;[Red](#,##0.00)' => :float, 'mm:ss' => :time, '[h]:mm:ss' => :time, 'mmss.0' => :time, '##0.0E+0' => :float, '@' => :float, #-- zusaetzliche Formate, die nicht standardmaessig definiert sind: "yyyy\\-mm\\-dd" => :date, 'dd/mm/yy' => :date, 'hh:mm:ss' => :time, "dd/mm/yy\\ hh:mm" => :datetime, }
STANDARD_FORMATS = { 0 => 'General', 1 => '0', 2 => '0.00', 3 => '#,##0', 4 => '#,##0.00', 9 => '0%', 10 => '0.00%', 11 => '0.00E+00', 12 => '# ?/?', 13 => '# ??/??', 14 => 'mm-dd-yy', 15 => 'd-mmm-yy', 16 => 'd-mmm', 17 => 'mmm-yy', 18 => 'h:mm AM/PM', 19 => 'h:mm:ss AM/PM', 20 => 'h:mm', 21 => 'h:mm:ss', 22 => 'm/d/yy h:mm', 37 => '#,##0 ;(#,##0)', 38 => '#,##0 ;[Red](#,##0)', 39 => '#,##0.00;(#,##0.00)', 40 => '#,##0.00;[Red](#,##0.00)', 45 => 'mm:ss', 46 => '[h]:mm:ss', 47 => 'mmss.0', 48 => '##0.0E+0', 49 => '@', }

Public Class methods

initialization and opening of a spreadsheet file values for packed: :zip

Public Instance methods

Returns the content of a spreadsheet-cell. (1,1) is the upper left corner. (1,1), (1,’A’), (‘A’,1), (‘a’,1) all refers to the cell at the first line and first row.

returns the type of a cell:

  • :float
  • :string,
  • :date
  • :percentage
  • :formula
  • :time
  • :datetime

returns the internal format of an excel cell

returns the internal type of an excel cell

  • :numeric_or_formula
  • :string

Note: this is only available within the Excelx class

returns the internal value of an excelx cell Note: this is only available within the Excelx class

Returns the formula at (row,col). Returns nil if there is no formula. The method formula? checks if there is a formula.

true, if there is a formula

returns each formula in the selected sheet as an array of elements [row, col, formula]

returns an array of sheet names in the spreadsheet

shows the internal representation of all cells for debugging purposes

[Validate]