How Do You Add a Download Button for a Specific Tableau Sheet?
Add a Download object to the dashboard and use Edit Button > Export to > Crosstab when viewers can choose the sheet in Tableau’s download dialog. For a button on an embedding web page that must target one worksheet directly, use the Embedding API’s exportCrosstabAsync(sheetName, format) method. Both routes retain the viewer’s applicable access and export permissions.
For example, an operations portal needs a “Download North sales” action beside a dashboard containing several reports. The intended file is the North Sales Detail table. Advanced Tableau Report Scheduler (ATRS) serves a different need when that table must also be prepared and delivered through a maintained reporting job.
- THE DIRECT ANSWER Choose a native download action or a named-sheet button
- REQUIREMENTS AND LIMITATIONS Match the button to the job it promises
- END-USER WORKFLOWS Keep recurring report delivery in a maintained ATRS job
- DEVELOPER AND API WORKFLOWS Export the worksheet by name in an embedded view
- CHOOSE YOUR NEXT STEP Choose the next step for the report
Choose a native download action or a named-sheet button
A Tableau download button should tell the reader what file to expect. For our portal example, “Download North sales” promises a particular table, while “Download dashboard data” leaves the choice open. Decide whether the viewer should select a sheet or receive one predetermined worksheet before choosing the implementation.
For the native route, drag a Download object from the dashboard’s Objects area onto the layout. Open the object menu, choose Edit Button, and choose Crosstab from the Export to menu. Choose a text or image style and add an informative tooltip. Tableau’s dashboard-object guide describes these controls and notes that crosstab downloading requires the workbook to be published to Tableau Cloud or Tableau Server.
Give a dedicated action a clear report target. This conceptual illustration shows the choice, not a Tableau interface.
The native Crosstab download lets the reader choose a dashboard sheet and XLSX or CSV. Use that route when selection is part of the task. Label it accordingly, for example “Choose sales sheet to download,” rather than implying that the button’s caption fixes the worksheet automatically.
If the portal must send one sheet without that selection step, a developer can call the Embedding API with its explicit name. This is a control on the host web page surrounding the embedded view; it is a different implementation from a native dashboard Download object. Chapter 4 shows the named-sheet request.
Make the button’s promise useful
Target: Name the report the reader expects to receive.
Choice: Decide whether the reader chooses a sheet or the application fixes it.
Format: Distinguish an XLSX workbook from a CSV data file.
Access: Keep the viewer’s download permissions in force.
Match the button to the job it promises
The visible button is only the start of the reporting job. A local download, an application-controlled export and a recurring file delivery have different owners and results. Keep those differences clear so the North sales action does not accidentally become a promise to distribute a weekly report.
| Requirement | Native or owned export route | ATRS fit and remaining work |
|---|---|---|
| Viewer chooses the sheet | Native Download object with Crosstab opens the selection route. | ATRS is unnecessary when an authorized interactive download meets the requirement. |
| One named worksheet per click | Embedding API exportCrosstabAsync accepts the worksheet name and Excel/CSV format. | Use native embedding for that immediate browser action; ATRS can maintain a separate reporting job. |
| A server-side XLSX response | REST exports summary data; a dashboard request returns only its first view. | Choose the intended source in a configured ATRS job when production and delivery must be maintained separately. |
| Repeatable workbook preparation | The application or analyst owns any work after the native export. | Excel output can use configured worksheet, template and column-format controls. |
| A report delivered later or repeatedly | A download action requires a viewer/application invocation; separate code can implement scheduling and delivery. | ATRS holds recurrence, report parameters, output and destinations in a saved job. |
The Embedding API method reference says the named sheet must belong to the active view. Its promise resolves when a download is initiated, not when the file is complete. The REST XLSX method is a separate operation; do not carry its first-dashboard-view behavior over to the named-sheet embedding method.
For our example, keep the button focused on the analyst’s current North table. If finance later asks for a prepared workbook in an operations folder every Monday, treat that as a separate delivery requirement rather than leaving a dashboard open to imitate a scheduler.
Separate the reporting actions
Native: Use the dashboard object for the documented selection route.
Embedding: Supply a worksheet name for a direct host-page action.
REST: Identify the intended view; do not assume a dashboard means every sheet.
Delivery: Choose a maintained job when recipients should receive files later.
Keep recurring report delivery in a maintained ATRS job
Use the approved North table as the source for a separate recurring job when the recipient needs the workbook without visiting the dashboard. Record the intended report, region, period, required columns and destination. A page button and a saved reporting job should be checked against the same sample, while retaining their different execution contexts.
In ATRS, create a Single Schedule. Select the linked Tableau account and the intended report’s Item Path, then give the job a clear name. Configure its report parameters explicitly; a filter selected in a user’s browser is not a setting in this independent job. The Single Schedule guide shows the account and report selection before timing, parameters and destinations.
The General page in the ATRS knowledgebase example. Choose the account and Item Path for your own report; the pictured Superstore values are examples.
Choose Excel output and the required folder or email destination. For a prepared workbook, evaluate the Tableau Excel report automation controls against finance’s sample and the current installation prerequisites. Confirm the columns, region, dates and total in the delivered file before making its recurrence active.
This takes over the repeated export, preparation and handoff. It does not turn ATRS into a browser download widget. If a portal requests the saved job through the API, it receives execution-tracking information; files follow the job’s configured destinations. The portal needs its own authorized file-return mechanism if the user must download the produced file from that page.
Compare the two outputs
Source: Map the browser action and saved job to the intended report.
Context: Configure the saved job’s values separately from browser filters.
Workbook: Open the received file and check its columns and total.
Destination: Confirm where the managed file arrives before enabling recurrence.
Export the worksheet by name in an embedded view
For a button that always targets the example worksheet, use the current Embedding API export workflow. Load the Embedding API library and your authenticated <tableau-viz> first, with the target worksheet in its active view. Use a compatible deployed library version and enable the action only after FirstInteractive.
The following illustrative module expects a button with ID download-north-sales and a status element with ID download-status. Create the button disabled in the page markup and give the status element role="status". Place the code in a <script type="module"> after those elements during initial embed setup, so its listener is registered before FirstInteractive. Replace “North Sales Detail” with the exact worksheet name; this code belongs on the embedding page, not in a dashboard text object.
import { TableauViz, TableauEventType, CrosstabFileFormat }
from "https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js";
const viz = document.querySelector("tableau-viz");
const button = document.querySelector("#download-north-sales");
const status = document.querySelector("#download-status");
button.disabled = true;
viz.addEventListener(TableauEventType.FirstInteractive, () => {
button.disabled = false;
button.onclick = async () => {
button.disabled = true;
status.textContent = "";
try {
await viz.exportCrosstabAsync("North Sales Detail", CrosstabFileFormat.Excel);
status.textContent = "Download initiated. Check your browser downloads.";
} catch {
status.textContent = "The download could not start. Check the sheet and access.";
} finally {
button.disabled = false;
}
};
});The CrosstabFileFormat enumeration defines Excel as XLSX and CSV as CSV. The explicit worksheet name avoids relying on an array position that can change when dashboard sheets are rearranged. If the active view changes or the sheet is renamed, handle the resulting error and update the approved target instead of silently exporting another worksheet.
Preserve the signed-in viewer’s access and export rules. Exercise the button with the relevant filters and with more than one permitted user, then open the actual downloaded file. The status says “initiated” because the method does not establish completed browser delivery or correct file contents.
If the button instead requests a managed reporting job, keep that call on the backend and use the ATRS Tableau report automation API workflow. Authorize the user’s job selection and track its result. This is a distinct server-side handoff, with configured destinations, rather than the Embedding API’s immediate download.
Keep the action dependable
Ready: Wait for the embedded view’s FirstInteractive event.
Name: Use the exact worksheet name in the active view.
State: Show progress and handle errors without claiming completed delivery.
Review: Retest a renamed sheet or changed dashboard before release.
Choose the next step for the report
Use a native Download object when a clear button and a sheet-selection dialog meet the need. Use a named-sheet embedding action when the portal must consistently target one worksheet for the signed-in viewer. In either case, confirm the actual file against the label before offering the action to readers.
Consider the ATRS Tableau report scheduler when the requirement expands into maintained workbook preparation, recurring execution and delivery. Bring the intended worksheet and a sample file to the evaluation, then agree where the report should arrive.
Explore application-controlled Tableau reporting with ATRS
Planning to maintain report delivery behind the portal? Use the guide to review ATRS deployment, access and reporting requirements with the application owner and report recipient.
Contributors:
Christian Ofori-Boateng
CEO, ChristianSteven Software

