Class: Excel::WorkBook
- Inherits:
-
Object
- Object
- Excel::WorkBook
- Defined in:
- lib/Excel/workbook.rb
Class Method Summary collapse
- .app_object ⇒ Object
- .close ⇒ Object
- .new(app, wb_name) ⇒ Object
- .save ⇒ Object
- .workbook_name ⇒ Object
- .worksheet(ws) ⇒ Object
- .worksheets ⇒ Object
Class Method Details
.app_object ⇒ Object
18 19 20 |
# File 'lib/Excel/workbook.rb', line 18 def self.app_object @app_object.app_object end |
.close ⇒ Object
22 23 24 25 |
# File 'lib/Excel/workbook.rb', line 22 def self.close app_object.workbooks[workbook_name].saved.set(true) app_object.workbooks[workbook_name].close end |
.new(app, wb_name) ⇒ Object
8 9 10 11 12 |
# File 'lib/Excel/workbook.rb', line 8 def self.new(app, wb_name) @app_object = app @workbook_name = wb_name self end |
.save ⇒ Object
36 37 38 |
# File 'lib/Excel/workbook.rb', line 36 def self.save app_object.workbooks[workbook_name].save end |
.workbook_name ⇒ Object
14 15 16 |
# File 'lib/Excel/workbook.rb', line 14 def self.workbook_name @workbook_name end |
.worksheet(ws) ⇒ Object
31 32 33 34 |
# File 'lib/Excel/workbook.rb', line 31 def self.worksheet ws # raise "Worksheet not found" if !(worksheets.include? ws) WorkSheet.new(self, ws) end |
.worksheets ⇒ Object
27 28 29 |
# File 'lib/Excel/workbook.rb', line 27 def self.worksheets app_object.workbooks[workbook_name].worksheets.get.collect {|ws| ws.name.get } end |