class ReadExcel

Constants

VERSION

Public Class Methods

new(filepath) click to toggle source
# File lib/read_excel.rb, line 8
def initialize(filepath)
  @filepath = filepath
  if @filepath =~ /xls\Z/i
    @read_adapter = ReadExcel::XLSReader.new(filepath)
  elsif @filepath =~ /xlsx\Z/i
    @read_adapter = ReadExcel::XLSXReader.new(filepath)
  else
    raise "#{filepath} doesn't seem excel file."
  end
end

Public Instance Methods

worksheets() click to toggle source

list of worksheets

# File lib/read_excel.rb, line 20
def worksheets
  @read_adapter.worksheets
end