Sha256: c04619d76d39793736788d15cdf1cb450d4f5c80fb6f4261b2bd219f744d32fc

Contents?: true

Size: 626 Bytes

Versions: 6

Compression:

Stored size: 626 Bytes

Contents

module RubyFromExcel
  class ArrayFormulaCell < FormulaCell
  
    def ArrayFormulaCell.from_other_cell(cell)
      afc = ArrayFormulaCell.new(cell.worksheet)
      afc.reference = cell.reference
      afc.xml_value = cell.xml_value
      afc.xml_type =  cell.xml_type
      afc
    end
  
    attr_accessor :array_formula_reference
    attr_accessor :array_formula_offset
  
    def parse_xml(xml)
      # No
    end
  
    def work_out_dependencies
      # No
    end
  
    def ruby_value
      "@#{reference.to_ruby} ||= #{array_formula_reference}.array_formula_offset(#{array_formula_offset.join(',')})"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubyfromexcel-0.0.10 lib/cells/array/array_formula_cell.rb
rubyfromexcel-0.0.9 lib/cells/array/array_formula_cell.rb
rubyfromexcel-0.0.7 lib/cells/array/array_formula_cell.rb
rubyfromexcel-0.0.6 lib/cells/array/array_formula_cell.rb
rubyfromexcel-0.0.5 lib/cells/array/array_formula_cell.rb
rubyfromexcel-0.0.4 lib/cells/array/array_formula_cell.rb