summaryrefslogtreecommitdiffhomepage
path: root/examples/pivot_table_example.md
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pivot_table_example.md')
-rw-r--r--examples/pivot_table_example.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pivot_table_example.md b/examples/pivot_table_example.md
index 8dd12955..50d20c5f 100644
--- a/examples/pivot_table_example.md
+++ b/examples/pivot_table_example.md
@@ -24,8 +24,8 @@ wb.add_worksheet(name: 'Basic Worksheet') do |sheet|
]
end
- sheet.add_pivot_table 'G4:L17', 'A1:E31' do |pivot_table|
- pivot_table.rows = ['Month', 'Year']
+ sheet.add_pivot_table 'G4:L17', 'A1:E31', sort_on_headers: ['Year', 'Month'] do |pivot_table|
+ pivot_table.rows = ['Year', 'Month']
pivot_table.columns = ['Type']
pivot_table.data = [ref: 'Sales', num_fmt: 4]
pivot_table.pages = ['Region']