Class: Axlsx::SheetData
- Inherits:
-
Object
- Object
- Axlsx::SheetData
- Defined in:
- lib/axlsx/workbook/worksheet/sheet_data.rb
Overview
This class manages the serialization of rows for worksheets
Instance Attribute Summary collapse
-
#worksheet ⇒ Object
readonly
Returns the value of attribute worksheet.
Instance Method Summary collapse
-
#initialize(worksheet) ⇒ SheetData
constructor
Creates a new SheetData object.
-
#to_xml_string(str = +'')) ⇒ String
Serialize the sheet data.
Constructor Details
Instance Attribute Details
#worksheet ⇒ Object (readonly)
Returns the value of attribute worksheet.
14 15 16 |
# File 'lib/axlsx/workbook/worksheet/sheet_data.rb', line 14 def worksheet @worksheet end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serialize the sheet data
19 20 21 22 23 24 25 |
# File 'lib/axlsx/workbook/worksheet/sheet_data.rb', line 19 def to_xml_string(str = +'') str << '<sheetData>' worksheet.rows.each_with_index do |row, index| row.to_xml_string(index, str) end str << '</sheetData>' end |