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.