Class: SpreadsheetML
- Inherits:
-
Object
- Object
- SpreadsheetML
- Defined in:
- lib/spreadsheetml.rb
Defined Under Namespace
Classes: Cell, Row, Table, Worksheet
Instance Attribute Summary collapse
-
#worksheets ⇒ Object
Returns the value of attribute worksheets.
Instance Method Summary collapse
-
#initialize(stream_or_string) ⇒ SpreadsheetML
constructor
A new instance of SpreadsheetML.
Constructor Details
#initialize(stream_or_string) ⇒ SpreadsheetML
Returns a new instance of SpreadsheetML.
6 7 8 9 10 11 12 13 14 |
# File 'lib/spreadsheetml.rb', line 6 def initialize(stream_or_string) @worksheets = [] return if stream_or_string.nil? doc = REXML::Document.new stream_or_string doc.elements.each("Workbook/Worksheet") { |worksheet| @worksheets << Worksheet.new(worksheet) } end |
Instance Attribute Details
#worksheets ⇒ Object
Returns the value of attribute worksheets.
4 5 6 |
# File 'lib/spreadsheetml.rb', line 4 def worksheets @worksheets end |