Harshit Virdi has noted he has access to Microsoft SQL Management Studio. There are two easy ways I know of to export results into Excel:
- Option 1 the "right click on your results" option:
Run your query like normal in Microsoft SQL Management Studio. Then right click on the results like this:
.
Choose "Save Results As..." and if you pick CSV (comma separated value) you'll be able to open that in Excel.
- Option 2 would be to Export from a table or view directly. Right click on the database (not the table) you want to export from, choose tasks, and
Export Data...
:

- A wizard will appear (ha!)
- Choose your Data Source (SQL Native Client)
- Pick your server and database
- Choose your Destination
- Select Excel, and pick a path. I keep it at Excel Version 97-2003 but you can try different ones
- Now you can choose to either write a query or pick a table, the choice is yours!
- Hit next and finish it up and boom, you have your data in Excel.
The export data wizard is rather powerful, you can also transfer data between servers very fast and easily. It's a tool worth learning more about. You may have noticed on the last steps of the wizard you can save your 'code' as an SSIS package. That way you could run the same export again, or automate it. However that goes beyond the scope of this question. Good luck!