Use the following steps to export from the Developer Console in Salesforce.
1. Login into Salesforce.2. Go to the Developer Console.
3. Execute the query in Query Editor.
4. Select all (Ctrl+A).
5. Paste in Excel Sheet.
6. Cut the required rows and paste it in a new excel file.
Thanks this information helped me a lot
This may be outdated. I just tried it: Ctrl-A within the results grid selects all the text on the page EXCEPT the query results. Double-clicking a result to make it available for individual copy-paste actions, then pressing Ctrl-A, selects the highlighted field in its entirety. I don't know why Salesforce would not make this feature routinely available.
Thank you!