Hi we embed GoodData dashboards on our web app (Re...
# gooddata-cloud
m
Hi we embed GoodData dashboards on our web app (React UI SDK) and need production-ready XLSX export from the embedded dashboard (reflecting current filters). From support we understand: • React SDK`exportDashboardToTabular()`is alpha / not for production Question: For a React SDK / embedded setup (not iframe), what’s the recommended production path for full-dashboard XLSX today? Thanks!
k
Based on the GoodData documentation, here are the current options for exporting a full dashboard to XLSX in an embedded React SDK setup: 1. Built-in Dashboard UI Export (Recommended standard path) If you are embedding the full dashboard using the
@gooddata/sdk-ui-dashboard
component, users can export the dashboard to XLSX directly through the native dashboard options menu [Tabular Data]: 1. Click the (ellipsis) menu in the top-right corner of the dashboard. 2. Select Export > Data (.xlsx). 3. Configure settings like Keep attribute cells merged and Export info [Tabular Data]. Note: Ensure the user has the required
Workspace.EXPORT
permission in the workspace, otherwise the export options will be disabled/greyed out [Export Dashboards and Widgets; Slack forum user question]. 2. Programmatic Export via Dashboard Commands (Beta) If you need to trigger the full dashboard XLSX export programmatically via code (for example, from a custom button inside a dashboard plugin or component), you can use the Model Command API using the
exportDashboardToExcel
command creator and
useDispatchDashboardCommand
hook [exportDashboardToExcel() function; Dashboard Component Detailed Description].
Copy code
import { 
  exportDashboardToExcel, 
  useDispatchDashboardCommand 
} from "@gooddata/sdk-ui-dashboard";

const ExportButton = () => {
  const dispatchExport = useDispatchDashboardCommand(exportDashboardToExcel);

  const handleExport = () => {
    // Parameters: mergeHeaders, exportInfo, widgetIds, fileName, format, pdfConfiguration, correlationId
    dispatchExport(true, true, undefined, "DashboardExport.xlsx");
  };

  return <button onClick={handleExport}>Export Dashboard to XLSX</button>;
};
Note: The command
exportDashboardToExcel
is currently marked as BETA [exportDashboardToExcel() function]. 3. Asynchronous Export Definition via API If programmatic, automated exports must strictly avoid Beta/Alpha SDK APIs, GoodData supports creating the export definition directly via the backend REST APIs / scheduled exports automations [Slack forum user question]. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups. 👀 Our Support team monitors all messages and will jump in if needed., with interactive elements
m
Thanks, this is helpful, but it seems to conflict with what we heard from support earlier, so I’d like to confirm what actually applies to our setup. Our setup: we embed the full dashboard via
@gooddata/sdk-ui-dashboard
(React SDK), not iframe. Earlier support guidance: • full-dashboard XLSX via built-in Export menu =iframe embed • React SDK tabular export =alpha/beta, not for production • REST =per visualization only, no single-call full-dashboard XLSX Your reply suggests: with
@gooddata/sdk-ui-dashboard
, users can already use → Export → Data (.xlsx) if they have
Workspace.EXPORT
. Could you please confirm: 1. Does the native → Export → Data (.xlsx) work today in aReact SDK embeddeddashboard (not iframe), in production? 2. If yes, are there any embed/config flags that can hide it (and what to check if we don’t see it)? 3. If we need acustom button, is`exportDashboardToExcel`/`exportDashboardToTabular`still beta/alpha andnot recommended for production, with no stable alternative for full-dashboard XLSX? We specifically need a production-ready path for full-dashboard XLSX from the embedded React dashboard. Thanks!
s
Hi Markéta, Thanks for flagging the mismatch — here's what I can confirm. The native ... -> Export -> Data (.xlsx) option is meant to work the same way whether your dashboard is embedded via iframe or through the React SDK's Dashboard component; iframe embedding isn't a requirement for it. Two things determine whether it's visible: - The viewing user needs the Workspace.EXPORT permission on the workspace. - You'll need SDK version 10.12.0 or newer — older versions can cause problems with exports in embedded setups. If you've checked both of those and still don't see the option, let me know and I'll take a closer look at your specific embed setup. On your third question - I'm checking that internally and will follow up here once I hear back. Thanks for your patience while we get you one consistent answer.
Hi Marketa, For a custom export button: this is still under development on our side, so I can't commit to it for production yet. If you critically need something now, exportDashboardToExcel (beta) is usable. Just expect it may still change.
Hi Markéta, Quick correction to my last message - exportDashboardToExcel is confirmed safe for production with a pinned SDK version. Still avoid exportDashboardToTabular for now. One more thing to check: if you trigger export via the iframe's postMessage API, only PDF is supported that way, not XLSX.
🙏 1