diff options
Diffstat (limited to 'lib/axlsx/workbook/worksheet/pivot_table.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/pivot_table.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/axlsx/workbook/worksheet/pivot_table.rb b/lib/axlsx/workbook/worksheet/pivot_table.rb index 97c4515b..62349288 100644 --- a/lib/axlsx/workbook/worksheet/pivot_table.rb +++ b/lib/axlsx/workbook/worksheet/pivot_table.rb @@ -159,13 +159,13 @@ module Axlsx # The part name for this table # @return [String] def pn - "#{PIVOT_TABLE_PN % (index + 1)}" + format(PIVOT_TABLE_PN, index + 1) end # The relationship part name of this pivot table # @return [String] def rels_pn - "#{PIVOT_TABLE_RELS_PN % (index + 1)}" + format(PIVOT_TABLE_RELS_PN, index + 1) end # The cache_definition for this pivot table @@ -245,7 +245,7 @@ module Axlsx str << "<dataFields count=\"#{data.size}\">" data.each do |datum_value| # The correct name prefix in ["Sum","Average", etc...] - str << "<dataField name='#{(datum_value[:subtotal] || '')} of #{datum_value[:ref]}' fld='#{header_index_of(datum_value[:ref])}' baseField='0' baseItem='0'" + str << "<dataField name='#{datum_value[:subtotal] || ''} of #{datum_value[:ref]}' fld='#{header_index_of(datum_value[:ref])}' baseField='0' baseItem='0'" str << " numFmtId='#{datum_value[:num_fmt]}'" if datum_value[:num_fmt] str << " subtotal='#{datum_value[:subtotal]}' " if datum_value[:subtotal] str << "/>" @@ -266,7 +266,7 @@ module Axlsx # References for header cells # @return [Array] def header_cell_refs - Axlsx::range_to_a(header_range).first + Axlsx.range_to_a(header_range).first end # The header cells for the pivot table |
