diff options
| author | James Lam <[email protected]> | 2022-07-09 23:13:05 +0200 |
|---|---|---|
| committer | Stefan Daschek <[email protected]> | 2022-07-09 23:14:37 +0200 |
| commit | f39e9068803f5cf28a339c67e92ab976c30b00f1 (patch) | |
| tree | 6040be8b56874c8939f9b1f5613623ed6fb9b8b0 /examples/pivot_table_example.md | |
| parent | 3703031ef2cc755fac8c7cb5b403170cda76fa67 (diff) | |
| download | caxlsx-f39e9068803f5cf28a339c67e92ab976c30b00f1.tar.gz caxlsx-f39e9068803f5cf28a339c67e92ab976c30b00f1.zip | |
Add pivot table option to sort headers (#143)
Diffstat (limited to 'examples/pivot_table_example.md')
| -rw-r--r-- | examples/pivot_table_example.md | 4 |
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'] |
