Method: Axlsx::SharedStringsTable#initialize
- Defined in:
- lib/axlsx/workbook/shared_strings_table.rb
#initialize(cells, xml_space = :preserve) ⇒ SharedStringsTable
Creates a new Shared Strings Table agains an array of cells
36 37 38 39 40 41 42 43 44 |
# File 'lib/axlsx/workbook/shared_strings_table.rb', line 36 def initialize(cells, xml_space=:preserve) @index = 0 @xml_space = xml_space @unique_cells = {} @shared_xml_string = "" shareable_cells = cells.flatten.select{ |cell| cell.plain_string? || cell.contains_rich_text? } @count = shareable_cells.size resolve(shareable_cells) end |