class ReadExcel::XLSXReader

Public Class Methods

new(filepath) click to toggle source
# File lib/read_excel/xlsx_reader.rb, line 31
def initialize(filepath)
  @workbook = RubyXL::Parser.parse(filepath)
  @worksheets = []
end

Public Instance Methods

worksheets() click to toggle source
# File lib/read_excel/xlsx_reader.rb, line 36
def worksheets
  if @worksheets.empty?
    @workbook.worksheets.each do |worksheet|
      @worksheets << Worksheet.new(worksheet)
    end
  end

  @worksheets
end