There isn't a great way to do this via excel or SSMS, but if you use BIDS, there is a simple way of achieving it, and I use it a lot myself....
Create a new report project.
Create a new Datasource, which connects to the cube.
Start the process to create a new report, and on the 'Design the query' screen, you can click on 'query builder'. This will pull up an GUI where measures and dimensions can be clicked and dragged, etc. Then click on the 'Design mode' icon, and it will toggle between the GUI view and showing the MDX.