module RemoteTable::Ods

Parses ODS files using Roo’s Openoffice class.

Know to have issues on JRuby.

Public Class Methods

extended(base) click to toggle source
# File lib/remote_table/ods.rb, line 6
def self.extended(base)
  base.extend ProcessedByRoo
end

Public Instance Methods

roo_class() click to toggle source
# File lib/remote_table/ods.rb, line 10
def roo_class
  if ::RUBY_PLATFORM == 'java'
    ::Kernel.warn "[remote_table] Opening ODS files on JRuby is known to fail because of a flaw in the underlying Roo library"
  end
  [:Openoffice, :OpenOffice]
  if ::Roo.const_defined?(:OpenOffice)
    ::Roo::OpenOffice
  elsif ::Roo.const_defined?(:Openoffice)
    ::Roo::Openoffice
  else
    raise "Couldn't find roo's OpenOffice class, maybe you need a newer version?"
  end
end