Method: Axlsx::Workbook#relationships
- Defined in:
- lib/axlsx/workbook/workbook.rb
#relationships ⇒ Relationships
The workbook relationships. This is managed automatically by the workbook
292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/axlsx/workbook/workbook.rb', line 292 def relationships r = Relationships.new @worksheets.each do |sheet| r << Relationship.new(sheet, WORKSHEET_R, WORKSHEET_PN % (r.size+1)) end pivot_tables.each_with_index do |pivot_table, index| r << Relationship.new(pivot_table.cache_definition, PIVOT_TABLE_CACHE_DEFINITION_R, PIVOT_TABLE_CACHE_DEFINITION_PN % (index+1)) end r << Relationship.new(self, STYLES_R, STYLES_PN) if use_shared_strings r << Relationship.new(self, SHARED_STRINGS_R, SHARED_STRINGS_PN) end r end |