Module: ObjectRepository::Reader::XLS
- Defined in:
- lib/watir-or/readers/xls.rb
Class Method Summary collapse
Class Method Details
.read(file, options = nil, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/watir-or/readers/xls.rb', line 6 def self.read(file, = nil, &block) if .nil? read_worksheet(Spreadsheet.open(file).worksheet(0), &block) elsif [:worksheet].is_a?(String) read_worksheet(Spreadsheet.open(file).worksheet([:worksheet]), &block) elsif [:worksheet] == :all Spreadsheet.open(file).worksheets.each { |worksheet| read_worksheet(worksheet, &block) } end end |