Sha256: 68b8c2e17b9b2502603d80e19f396dbbf1efd06bc8859ec469adb9d9c11e4ab2

Contents?: true

Size: 585 Bytes

Versions: 5

Compression:

Stored size: 585 Bytes

Contents

require 'rxl/version'
require 'rubyXL'
require_relative 'workbook'

module Rxl

  def self.write_file(filepath, hash_workbook)
    begin
      rubyxl_workbook = Workbook.hash_workbook_to_rubyxl_workbook(hash_workbook)
    rescue => e
      return e
    end
    rubyxl_workbook.write(filepath)
  end

  def self.read_file(filepath)
    rubyxl_workbook = RubyXL::Parser.parse(filepath)
    Workbook.rubyxl_to_hash(rubyxl_workbook)
  end

  def self.read_file_as_tables(filepath)
    hash_workbook = read_file(filepath)
    Workbook.hash_workbook_to_hash_tables(hash_workbook)
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rxl-0.1.4 lib/rxl.rb
rxl-0.1.3 lib/rxl.rb
rxl-0.1.2 lib/rxl.rb
rxl-0.1.1 lib/rxl.rb
rxl-0.1.0 lib/rxl.rb