diff options
| author | Samuel de Framond <[email protected]> | 2013-06-13 19:48:23 +0800 |
|---|---|---|
| committer | Samuel de Framond <[email protected]> | 2013-06-13 19:48:23 +0800 |
| commit | 181863629922da0cb9e433df894d977b19dbf9c6 (patch) | |
| tree | 221de471d9232588871bf9cb2073bf98a5f259f2 /lib/axlsx/workbook/worksheet/pivot_table.rb | |
| parent | 6a80d144f017fb9b61e264e7d46dbebe1b60ede3 (diff) | |
| download | caxlsx-181863629922da0cb9e433df894d977b19dbf9c6.tar.gz caxlsx-181863629922da0cb9e433df894d977b19dbf9c6.zip | |
Modify pivot table caption according to subtotal function.
Diffstat (limited to 'lib/axlsx/workbook/worksheet/pivot_table.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/pivot_table.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/pivot_table.rb b/lib/axlsx/workbook/worksheet/pivot_table.rb index 745aaeca..baa08988 100644 --- a/lib/axlsx/workbook/worksheet/pivot_table.rb +++ b/lib/axlsx/workbook/worksheet/pivot_table.rb @@ -191,7 +191,7 @@ module Axlsx unless data.empty? str << '<dataFields count="' << data.size.to_s << '">' data.each do |datum_value| - str << '<dataField name="Sum of ' << datum_value << '" ' << + str << "<dataField name=\"#{@subtotal} of " << datum_value << '" ' << 'fld="' << header_index_of(datum_value).to_s << '" ' << 'baseField="0" baseItem="0" subtotal="' << @subtotal << '"/>' end |
