Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
Admin

How to Export a Salesforce Report to Excel: 4 Methods Compared

Four ways to get a Salesforce report into Excel — Lightning Export, Printable View, scheduled email subscription, and Data Loader for huge reports. Choose by record count and how often you'll repeat it.

Exporting a Salesforce report to Excel is one of those tasks that looks like a single workflow but actually has four valid approaches — and picking the wrong one wastes hours. Below is the decision matrix plus exact steps for each method.

Quick decision matrix

Your situation Method
One-off export, < 100k rows Lightning Export button (.xlsx, Details Only)
Need totals, group breaks, subtotals Lightning Export → Formatted Report
Recurring (daily/weekly) report to your inbox Report Subscribe with .xlsx attachment
> 100k rows or full historical data Data Loader / Salesforce CLI export
Need both raw data and pivot tables Export Details Only, then pivot in Excel

Method 1: Lightning Export (the default 95% answer)

This is what most users want when they ask "how do I export a Salesforce report to Excel."

  1. Open the report (Reports tab → click the report name)
  2. Click the export icon (down-arrow) in the top-right of the report header. If you don't see it, your profile is missing the Export Reports permission — ask an admin.
  3. Choose between two export views:
    • Formatted Report — keeps column groups, subtotals, grand totals; ideal for sharing or printing.
    • Details Only — raw row data with header row, no totals; ideal for further analysis or pivot tables.
  4. Pick file format: .xlsx (Excel native) or .csv (universal, smaller).
  5. Click Export. Your browser downloads the file.

The .xlsx export caps at 100,000 rows. Hit the cap and Salesforce truncates silently — always check row counts after export.

Method 2: Subscribe (recurring email)

For recurring reports — weekly sales pipeline, daily activity rollup — set up a subscription instead of running it manually.

  1. Open the report → click Subscribe in the action bar.
  2. Set frequency (daily / weekly / monthly) and time.
  3. Add recipients (yourself + others).
  4. Choose attach format: Formatted Report (.xlsx) or Details Only (.csv).
  5. Save. The first email arrives at the next scheduled interval.

Two caveats:

  • Subscriptions respect each recipient's record visibility — if a colleague can't see a row, it's stripped from their copy.
  • The 100,000-row export cap still applies.

Method 3: Data Loader / Salesforce CLI for huge exports

When the report exceeds 100k rows or you need to export the underlying object data outside the report definition, switch to Data Loader or Salesforce CLI:

# Salesforce CLI: export every Account modified in the last 90 days
sf data query \
  --query "SELECT Id, Name, Industry, AnnualRevenue, LastModifiedDate FROM Account WHERE LastModifiedDate >= LAST_N_DAYS:90" \
  --result-format csv \
  --output-file accounts-90d.csv

This bypasses report builder limits — only governor limits (20k rows for synchronous SOQL, more via Bulk API) apply. You lose report features (subtotals, grouping, formatted columns) and gain unlimited row counts plus scriptability.

Method 4: Reports REST API (programmatic)

For custom integrations — embedding a Salesforce report in a Power BI dashboard, syncing to a data warehouse — use the Analytics REST API:

GET /services/data/vXX.0/analytics/reports/{reportId}
GET /services/data/vXX.0/analytics/reports/{reportId}?includeDetails=true

Returns JSON with report metadata, fact map (raw rows), and aggregations. Tools like Power Automate, Zapier, n8n, and custom Node scripts all use this endpoint. It honours your report definition (filters, groups) without the row-count cap of the UI export.

Why is my export missing rows?

Three failure modes I see weekly:

  • 2,000-row report preview vs 100,000-row export. The report runs in the browser with a 2k preview cap. Don't copy from the on-screen table — use the Export button.
  • Hidden row limit in the report filter. Some reports have an explicit "Limit Rows" filter set to a small number. Open the Filters panel and check.
  • Sharing & visibility. The user exporting may not have View All Data on every record the report owner can see. Confirm with: re-run the report as the owner, compare row count.

Why isn't the .xlsx file opening cleanly in Excel?

If Excel shows "The file format and extension don't match" or warns about "potentially unsafe content," the cause is usually that Salesforce sent a .csv with .xlsx extension via subscription. Workaround: rename to .csv and import via Data → From Text/CSV.

Common mistakes

  • Confusing Formatted Report with Details Only — formatted is human-readable, details is machine-friendly.
  • Trying to export over 100k rows from the UI — silently truncates.
  • Forgetting that subscriptions filter by recipient sharing — your colleagues' files won't match yours.
  • Copy-pasting the on-screen preview instead of using Export — you only get 2k rows that way.

For most users, the Lightning Export button + Details Only .xlsx is the right answer. Switch to subscriptions for recurring reports, and reach for Data Loader / CLI when the row count goes past six digits. See How to Share a Salesforce Report for the companion guide on getting the same data in front of a colleague without exporting at all.

Frequently asked questions

How do I export a Salesforce report to Excel?

Open the report → click the export icon (down-arrow) in the report header → choose 'Formatted Report' (preserves headers, totals, summaries) or 'Details Only' (raw data, best for further analysis) → select .xlsx → click Export. The file downloads to your browser's default folder. This works in Lightning Experience for reports up to 100,000 rows.

What's the difference between Formatted Report and Details Only export?

Formatted Report keeps the visual layout — column headers, group breaks, subtotals, grand totals — and is best when you'll print or share the file. Details Only exports just the row data with column headers, no formatting or totals — better when you'll pivot, sort, or merge the data with other Excel content.

What is the row limit for exporting a Salesforce report?

Lightning .xlsx export supports up to 100,000 rows for matrix and tabular reports. CSV export from Reports has a similar 100,000-row cap. For larger pulls, use Data Loader (`sf data export tree` via Salesforce CLI) or the Reports REST API which supports pagination beyond the report-builder limits.

Can I schedule a Salesforce report to email me as Excel?

Yes. From the report → Subscribe → set Schedule (daily/weekly/monthly) → choose recipients → optionally attach as Excel (.xlsx) or formatted PDF. The subscription sends the live report at each interval. Note: scheduled emails attach the report only if your org has the 'Subscribe to Reports' user permission and the org allows attachments larger than the email policy.

Why is my Salesforce report export missing rows?

Three common causes: (1) you're hitting the 2,000-row preview limit instead of the full export — click 'Export' in the menu, not 'Run' or copy-paste; (2) the report has a row limit set in the Filters panel; (3) the user running the export doesn't have access to records that the report owner does. Run as the report owner or grant View All Data on the relevant objects.

How do I export Salesforce report data without the headers?

Use 'Details Only' export, then in Excel select Row 1 → right-click → Delete. Or open the .csv export in a text editor and remove the first line. There's no native option to export without headers in Lightning. For automated headerless extracts, use Salesforce CLI: sf data query -q 'SELECT ...' --result-format csv | tail -n +2.

Can I export a Salesforce report to Excel automatically?

Three options: (1) report subscription emails the file on a schedule — easiest for non-technical users; (2) Data Loader CLI scheduled via Windows Task Scheduler or cron — works for raw object data, not report definitions; (3) Reports REST API called from a script (Power Automate, Zapier, custom Node) — most flexible but requires setup. Choose by frequency and complexity.

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment