Module: SimpleXlsxReader

Defined in:
lib/simple_xlsx_reader.rb,
lib/simple_xlsx_reader/loader.rb,
lib/simple_xlsx_reader/version.rb,
lib/simple_xlsx_reader/document.rb,
lib/simple_xlsx_reader/hyperlink.rb,
lib/simple_xlsx_reader/loader/sheet_parser.rb,
lib/simple_xlsx_reader/loader/workbook_parser.rb,
lib/simple_xlsx_reader/loader/style_types_parser.rb,
lib/simple_xlsx_reader/loader/shared_strings_parser.rb

Defined Under Namespace

Classes: CellLoadError, Document, Hyperlink, Loader

Constant Summary collapse

DATE_SYSTEM_1900 =
Date.new(1899, 12, 30)
DATE_SYSTEM_1904 =
Date.new(1904, 1, 1)
VERSION =
'5.1.0'

Class Method Summary collapse

Class Method Details

.configurationObject



37
38
39
40
41
42
# File 'lib/simple_xlsx_reader.rb', line 37

def configuration
  @configuration ||= Struct.new(:catch_cell_load_errors, :auto_slurp).new.tap do |c|
    c.catch_cell_load_errors = false
    c.auto_slurp = false
  end
end

.open(file_path) ⇒ Object



44
45
46
# File 'lib/simple_xlsx_reader.rb', line 44

def open(file_path)
  Document.new(file_path: file_path).tap(&:sheets)
end

.parse(string_or_io) ⇒ Object



48
49
50
# File 'lib/simple_xlsx_reader.rb', line 48

def parse(string_or_io)
  Document.new(string_or_io: string_or_io).tap(&:sheets)
end