Method: Spreadsheet::Excel::Writer::Workbook#write_sst
- Defined in:
- lib/spreadsheet/excel/writer/workbook.rb
#write_sst(workbook, writer, offset) ⇒ Object
479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/spreadsheet/excel/writer/workbook.rb', line 479 def write_sst workbook, writer, offset # Offset Size Contents # 0 4 Total number of strings in the workbook (see below) # 4 4 Number of following strings (nm) # 8 var. List of nm Unicode strings, 16-bit string length (➜ 3.4) strings = worksheets(workbook).inject [] do |memo, worksheet| memo.concat worksheet.strings end total = strings.size strings.uniq! _write_sst workbook, writer, offset, total, strings end |