Export Reports in Salesforce Lightning as a CSV file

If you need to export a report as a CSV file in Salesforce Lightning experience, this is a post for you. There is a simple URL hack that many people used (abused?) in Salesforce Classic to achieve this, but for many this hack stopped working after the migration to Lightning.

How to export a report in Salesforce Lightning?

If you migrated to Salesforce Lightning you can still use a URL hack to export your reports in a CSV format, you just need to set the correct parameters. Below is an example of a correct URL format with all the necessary parameters:

/REPORT_ID?csv=1&exp=1&enc=UTF-8&isdtp=p1

If you replace the REPORT_ID with the actual ID value in the above string and append it to your Salesforce domain, it will give you a direct link to download a Salesforce report as a CSV file. The full URL would look something like this: https://www.xxx.my.salesforce.com/00O24000004FX0a?csv=1&exp=1&enc=UTF-8&isdtp=p1

One last thing to point out is that this will work just as good if you are still using Salesforce Classic.

Conclusion

This was a short post, but I believe it is a useful one. I have been getting upvotes and comments on my StackExchange answer, so I know that there are people still struggling with this.

Written on September 18, 2019