In case you have no access to the workbench, can we download the query result from the Developer Console?
Build a Query in Developer Console
Open Developer Console, File > Open > Objects > select an object > click Open (or double click the object name).
Select the fields by hold the Ctrl key (and Shift key) for Windows users, then hit the
Query button, Id field will be auto-added.
Click the Execute button, developer console will open a tab with the query result.
Export query result to Excel file
This is tested in Chrome and chromium-based web engines (such as Edge and Opera), so not sure for Firefox and Safari.
Right-click on the query result and select Inspect.
Look for the table tag, then do "Copy element".
Open Excel and Paste to get the result.
Thank you but the "Copy element" doesn't work because when I tried to Paste it into Excel, it includes the HTML tags. None of the other Copy/Paste options worked. Could you please clarify the Excel version and the exact Paste option you're choosing. I ended up doing the query in the Workbench and exporting as CSV but I may not always have access to the workbench, so this could be very helpful to someone. I hope Salesforce will add this functionality out of the box someday.
ReplyDeleteI just try and it works, it is simply a copy and paste.
DeleteI am using Microsoft Excel version 2102 (Build 13801)
It took me a good 15 tries (and because I am stubborn, I kept doing it over and over and over again). I honestly don't know what I did differently the last time because, come on, this is copy and paste. But it didn't work the first bunch of times.
ReplyDeleteassume you manage to get it works!
DeleteI did. Thank you for this information. Very helpful.
Deleteawesome, glad to hear it 😊
DeleteJohan, this article was very helpful for me and your outlined solution worked for me.
ReplyDeleteThank You!
awesome, glad to hear!
DeleteIs it just me or does it only grab the first 2,000 records?
ReplyDeleteI am not sure how to get more 2K in Developer Console query editor, but you can use workbench to get all records https://workbench.developerforce.com/login.php
DeleteUse workbench application and download it as excel.
ReplyDeleteThank you for posting this. Works perfectly.
ReplyDeleteAwesome hack
ReplyDelete