Class: Rxls::Base
- Inherits:
-
Object
- Object
- Rxls::Base
- Defined in:
- lib/rxls/base.rb
Instance Method Summary collapse
-
#initialize(file) ⇒ Base
constructor
A new instance of Base.
- #quit ⇒ Object
- #worksheet(n, mapping = nil) ⇒ Object
Constructor Details
#initialize(file) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 11 12 13 |
# File 'lib/rxls/base.rb', line 5 def initialize file @obj = begin WIN32OLE.connect('excel.application') rescue WIN32OLE.new('excel.application') end file = File. "../../../test/fixtures/#{file}.xls", __FILE__ if file.kind_of? Symbol @obj.workbooks.open file end |