Salesforce File Export Errors: 9 Common Problems and How to Fix Them

File export problems in Salesforce rarely announce themselves clearly. The export completes with fewer files than expected. A progress bar stops moving. A message says you lack permission when you are the System Administrator. Most of these come down to a short list of causes, and almost all of them can be diagnosed in a few minutes once you know where to look.

The fixes below apply whatever tool you are using: the Data Export Service, Data Loader, a script, or SFDC File Exporter. Where our own app has a specific setting, we point to it.

SymptomMost likely cause
No data exported / zero filesVisibility, or wrong object
Fewer files than expectedMissing Query All Files, private attachments
"Insufficient privileges" / "don't have permission"API Enabled or object access missing
Export stops partwayAPI request limit reached
Taking foreverScope too wide, throttling, slow destination
Empty or corrupted filesNo content at source
CSV with links instead of filesRecord export tool used for binaries
Download link gone48-hour expiry
Garbled characters in names or CSVEncoding

1. "No Data Exported" or Zero Files

Cause. Either the user cannot see the files, or the files are not in the object being exported.

Fix.

  1. Run both counts as the exporting user: SELECT COUNT() FROM ContentDocument and SELECT COUNT() FROM Attachment. Older orgs often hold most documents as classic Attachments. If the first is near zero and the second is large, export Attachments, not Files.
  2. Check the filter. A date range on CreatedDate when you meant LastModifiedDate, or a list view owned by another user, returns nothing without complaint.
  3. Confirm you are logged in to the right org. Production and sandbox use different login servers, and a freshly refreshed sandbox may hold no files at all.

2. The Export Returns Fewer Files Than the Org Contains

Cause. Salesforce Files follow their own sharing model. A query on ContentDocument or ContentVersion returns only files the user owns, files shared with them, and files in libraries they belong to. View All Data on its own does not override this.

Fix. Grant the exporting user the Query All Files permission through a permission set. It requires View All Data and lets the user query every file in the org. Re-run the count afterwards; in many orgs it jumps sharply.

For classic Attachments the equivalent trap is IsPrivate. Private attachments are visible only to their owner and to users with Modify All Data.

This is the most damaging error on the list because nothing fails. The export finishes cleanly with a partial set, and the gap is found after the source org has gone. Always compare the exported count with a count taken by a user who has Query All Files.

3. "Insufficient Privileges" or "You Don't Have Permission"

Cause. One of the following is missing on the user's profile or permission sets.

  • API Enabled. Required by every external tool. Without it login fails with API_DISABLED_FOR_ORG or a similar message. Professional Edition needs the API add-on.
  • Read access to the parent object. Files inherit visibility from the records they are attached to.
  • Weekly Data Export. The Data Export page in Setup needs its own permission.
  • Export Reports. Needed for the report Export button to appear.
  • Connected App access. With OAuth, the app must be approved for the user's profile and IP relaxation set appropriately.

Fix. Create a dedicated "File Export" permission set containing API Enabled, View All Data and Query All Files, and assign it to the exporting user for the duration of the project. Login-specific errors such as "Invalid client credentials" are covered in the app troubleshooting guide.

4. Export Stops Partway: REQUEST_LIMIT_EXCEEDED

Cause. The org has spent its API requests for the rolling 24 hours. Each file download is one request, and every other integration draws on the same allocation.

Fix.

  1. Check Setup → System Overview → API Requests, Last 24 Hours.
  2. Wait for usage to fall. The window is rolling, so capacity returns gradually.
  3. Resume with a smaller scope, overnight. Split by object or year.
  4. Use a tool that continues instead of restarting. SFDC File Exporter pauses at the limit and on restart skips files already in the output folder.

Sizing guidance is in Salesforce data export limits.

5. The Export Is Taking Forever

Cause. File exports are slower than record exports by nature: one request and one transfer per file. Common aggravators are a very wide scope, Salesforce throttling, Wi-Fi, and writing directly into a synced cloud folder that uploads every file as it lands.

Fix.

  • Estimate before judging. 200,000 files at a few files per second is most of a day. That is normal.
  • Filter by date, object or record type and run batches in sequence.
  • Export to a local disk, then copy to the network share or cloud folder.
  • Use a wired connection and stop the machine from sleeping.
  • Check for antivirus scanning every file as it is written to the output folder.

If the Data Export Service itself shows no progress for a day or more, it is queued behind platform load. There is nothing to configure. Raise a case with Salesforce Support if it does not complete.

6. Exported Files Are Empty or Will Not Open

Cause. The record exists but has no binary content, or the file was deleted mid-export.

Fix. Download the same file from the record in the browser. If that fails too, the source is the problem. Find them in advance:

SELECT Id, Title FROM ContentVersion WHERE ContentSize = 0 AND IsLatest = true
SELECT Id, Name, ParentId FROM Attachment WHERE BodyLength = 0

Files exported by the Data Export Service have no extension. They are not corrupt. Rename them using the file name from the accompanying CSV.

7. You Got a CSV of Links Instead of Files

Cause. A record export tool was used on a file object. Data Loader and SOQL queries return metadata for ContentVersion and Attachment, with the binary field as a reference rather than content.

Fix. Nothing is wrong with the export. It is the wrong kind of tool. Use one that retrieves binaries. See Data Loader alternatives.

8. The Download Link Has Expired

Cause. Data Export Service files are deleted 48 hours after the export completes.

Fix. There is no recovery. Wait for the next eligible export, which is up to a week away, or up to 29 days on Professional and Developer editions. To avoid a repeat, schedule the export to finish early in the working week, or use an on-demand tool for anything with a deadline.

9. Garbled Characters in File Names or CSVs

Cause. Encoding. Salesforce stores text as UTF-8. Excel on Windows opens CSVs in a legacy encoding by default, which breaks accented, Japanese, Hebrew and other non-Latin characters.

Fix.

  • In Data Loader, enable both UTF-8 read and write options in Settings.
  • Open CSVs in Excel through Data → From Text/CSV and choose 65001: Unicode (UTF-8). Do not double-click the file.
  • File names containing characters the operating system forbids, such as : / \ ? * on Windows, have to be substituted by the export tool. Expect small differences between the Salesforce title and the name on disk.
  • Very long titles inside deep folder paths can exceed Windows path limits. Use a short output path such as D:\sf.

A Five-Minute Diagnostic

  1. Which object holds the files: ContentDocument, Attachment, Document or Note?
  2. What count does a user with Query All Files get?
  3. How many API requests are left today?
  4. Does one affected file download from the browser?
  5. What does the tool's log say for the first failure? In SFDC File Exporter, enable detailed logging in Settings and check the job history.

Frequently Asked Questions

Why does my Salesforce export say no data was exported?

Usually because the exporting user cannot see the records, or the export is pointed at the wrong object. Files are only returned to users who own them, have them shared, or hold the Query All Files permission. Also check whether the org's documents are classic Attachments rather than Salesforce Files, since the two are stored in different objects.

What permission do I need to export all files from Salesforce?

API Enabled, read access to the parent objects, and for a complete export the Query All Files permission, which lets a user with View All Data query every ContentDocument and ContentVersion in the org. Without it, even a System Administrator only receives the files they own or that are shared with them.

How do I fix REQUEST_LIMIT_EXCEEDED during an export?

The org has used its API request allocation for the rolling 24-hour period. Wait for requests to age out, then continue with a smaller scope outside business hours. Check current usage in Setup under System Overview. Use a tool that resumes rather than restarts, and switch recurring jobs to incremental mode.

Why is my Salesforce file export so slow?

Each file is a separate API request, so duration is driven by file count, total size, network speed and Salesforce's own throttling. Narrow the scope with filters, run overnight, use a wired connection, and write to a local disk rather than a network or synced folder during the export.

Why are some exported Salesforce files empty or corrupted?

Most often the file has no content in Salesforce either, for example a failed upload with a size of zero, or it was deleted while the export was running. Try downloading the same file from the record in the browser. If it fails there too, the problem is at the source.

Most Export Errors Are Visibility or Volume

Work through the list and nearly every case lands in one of two places: the user could not see the files, or the org ran out of requests. Fix the permission set and size the batches, and exports become routine. If you are using SFDC File Exporter and none of this resolves it, contact support with the log from the failing run.

Stuck on a Salesforce Export Error?

SFDC File Exporter logs every success and failure so you can see what went wrong. If you are still stuck, the RASPSYS team answers within one business day.