Method: Axlsx::CellSerializer.to_xml_string
- Defined in:
- lib/axlsx/workbook/worksheet/cell_serializer.rb
.to_xml_string(row_index, column_index, cell, str = '') ⇒ String
Calls the proper serialization method based on type.
11 12 13 14 15 16 17 |
# File 'lib/axlsx/workbook/worksheet/cell_serializer.rb', line 11 def to_xml_string(row_index, column_index, cell, str='') str << ('<c r="' << Axlsx::cell_r(column_index, row_index) << '" s="' << cell.style.to_s << '" ') return str << '/>' if cell.value.nil? method = cell.type self.send(method, cell, str) str << '</c>' end |