Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Export a Pivot Table and Add Header Actions

Add Export and Refresh buttons to a Pivot Table header, so users download the summary as Excel or CSV and reload the numbers without leaving the screen.

Before the Monday pipeline meeting, a sales manager wants the summary in Excel to paste into the deck, and fresh numbers after a colleague moves a deal. Two buttons in the Pivot Table header cover both: Export downloads the table as it appears, with its totals, and Refresh reruns the query.

Pivot Table with Export and Refresh buttons in its header above a pipeline summary
Export and Refresh sit in the table header.

Before you start

Steps

1

Add the two buttons

Select the Pivot Table on the screen and click Open Component Builder. In the Header group of the Properties tab, add two Actions:

Label
Name
Icon Name

Export

export

utility:download

Refresh

refresh

utility:refresh

Then set Visible Actions Buttons to 2, so both show as buttons instead of a menu.

An action needs a Name, plus a Label or an Icon Name, or it does not appear. The Name is what the interactions below point to.

2

Wire Export to the Export To interaction

Open the Interactions tab. Under Header Action Click, add an interaction:

  1. Target Name: pick Export in the list. The picker shows each header action by its label and stores its name, export.

  2. Type: Export To.

  3. Default File Name: Pipeline review.

  4. Default Export View: Formatted Report.

  5. Available File Formats: Excel and CSV.

Interactions tab with a Header Action Click on Export set to Export To, Formatted Report view and Excel and CSV formats
The Export button runs Export To.

Export To describes every setting of the interaction.

3

Pick the export view

Both views export the same grid: the same rows, columns and totals as the screen. They differ in how the values are written.

Default Export View
What lands in the file
Best for

Formatted Report

Values formatted as on screen: currency, percentages, dates. Excel cells keep a number format.

Sharing or presenting the summary

Details Only

The same values without formatting.

Formulas, or importing into another tool

Users can still switch views in the export dialog. Default Export View only sets the starting choice.

4

Wire Refresh to Refresh Query

Still under Header Action Click, add a second interaction:

  1. Target Name: pick Refresh in the list (stored as refresh).

  2. Type: Refresh Query.

It reruns this Pivot Table's query and redraws the table with the current records. There is nothing else to set.

5

Save and test

Save the flow and click Debug. The header shows Export and Refresh next to the title.

Click Export. A dialog titled Export opens with File Name set to Pipeline review, Formatted Report selected under Export View, and Excel Format .xlsx under Format. With Excel and CSV both allowed, Format offers Excel Format .xls, Excel Format .xlsx and Comma Delimited .csv; Encoding Type appears only for the CSV format. Click Export: the browser downloads Pipeline review.xlsx, laid out like the table.

Change the amount of one deal in another tab, then click Refresh: the cell and its totals update.

Export dialog with file name Pipeline review, Formatted Report selected as export view and Excel Format .xlsx as format
The export dialog opens with the defaults set in the interaction.

To skip the dialog, turn on Hide Export Dialog in the Export To interaction. The file downloads at once with the default name and view. If both Excel and CSV are available, it downloads as .xlsx. With no Default File Name, the file is named after the object, here Opportunity.

Troubleshooting

A button does not appear in the header

The action has no Name, or neither a Label nor an Icon Name. Check also that Hidden is off on the action and Hide Actions is off in the Header group.

Clicking the button does nothing

No Header Action Click interaction targets that action. Open the interaction and check that Target Name shows the button's label. If you renamed the action's Name after wiring it, pick it again: the interaction stores the name, and export and Export are two different actions.

Accents or symbols look wrong in the CSV file

The CSV encoding does not match what the spreadsheet expects. In the dialog, pick another Encoding Type, such as Unicode (UTF-8), or set Default Encoding Type in the interaction. Excel files have no encoding to pick.

The CSV file separates columns with semicolons

The user's locale writes decimals with a comma, so Comma Delimited .csv separates columns with semicolons, which a spreadsheet set to that locale expects. For a file separated by commas, pick Comma Delimited (non-locale) .csv: the dialog offers it only in those locales.

Details Only did not export the records

Details Only exports the summary grid, with unformatted values, not the records behind it.

Was this helpful?