Module: RobustExcelOle

Defined in:
lib/robust_excel_ole.rb,
lib/robust_excel_ole/cell.rb,
lib/robust_excel_ole/excel.rb,
lib/robust_excel_ole/range.rb,
lib/robust_excel_ole/sheet.rb,
lib/robust_excel_ole/cygwin.rb,
lib/robust_excel_ole/version.rb,
lib/robust_excel_ole/book_store.rb

Defined Under Namespace

Modules: Cygwin, SpecHelpers Classes: BookStore, BookStoreError, Cell, Excel, Range, Sheet, SheetError, SheetErrorNValue, VBAMethodMissingError

Constant Summary collapse

VERSION =
"0.3.4"

Class Method Summary collapse

Class Method Details

.absolute_path(file) ⇒ Object



14
15
16
17
18
# File 'lib/robust_excel_ole.rb', line 14

def absolute_path(file)
  file = File.expand_path(file)
  file = RobustExcelOle::Cygwin.cygpath('-w', file) if RUBY_PLATFORM =~ /cygwin/
  WIN32OLE.new('Scripting.FileSystemObject').GetAbsolutePathName(file)
end

.canonize(filename) ⇒ Object



20
21
22
23
# File 'lib/robust_excel_ole.rb', line 20

def canonize(filename)
  raise "No string given to canonize, but #{filename.inspect}" unless filename.is_a?(String)
  filename.downcase rescue nil
end