Method: Excelx#method_missing

Defined in:
lib/roo/excelx.rb

#method_missing(m, *args) ⇒ Object



158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/roo/excelx.rb', line 158

def method_missing(m,*args)
  # is method name a label name
  read_labels unless @labels_read
  if @label.has_key?(m.to_s)
    sheet = @default_sheet unless sheet
    read_cells(sheet) unless @cells_read[sheet]
    row,col = label(m.to_s)
    cell(row,col)
  else
    # call super for methods like #a1
    super
  end
end