Feb 122019
Azure Data Studio

Azure Data Studio continues to grow on me. I previously wrote about getting my favorite keyboard shortcuts to work, which made me very happy, but now for a feature I love even more – saving result sets to Excel!

Yes, I know, spreadsheets can be evil. They can even be places where good datasets go to die, but it’s important to remember that they’re a necessary evil. Sometimes you just need a result set in a spreadsheet, whether you want it to be in one or not.

In SQL Server Management Studio, there’s no single-step way to save a result set to Excel. Most commonly I will just copy/paste a result set into a spreadsheet, but depending on the size of the result set and the types of data involved, that doesn’t always play nicely.

But Azure Data Studio does it WAY better, trust me. If you want that result set in a spreadsheet, just save it as one and poof – you have an Excel file!

Try It Yourself!

In Azure Data Studio, query the dataset of your choosing. I’m using my Chicago Parking Tickets database. Once you have your results, look at the icons on the right side of the window.

(click to enlarge)

The second icon from the top will save the entire result set to Excel. Click it, pick a filename and folder to save it to and you’re good to go.

But wait – there’s more!

You can also save a subset of the results directly to Excel. Select the rows, columns, or block of interest (you can click and drag to select within the results!) and then right-click. You’ll get a dialog where you can choose to save the selection:

Whichever method you choose, Azure Data Studio makes it very simple to save results directly to a spreadsheet. Happy querying!

Dec 182018

Azure Data StudioAzure Data Studio (formerly Microsoft SQL Operations Studio) is Microsoft’s new “cross-platform, lightweight tool for modern database development and operations.” It is not a replacement for SQL Server Management Studio (not yet anyway), but I can see it becoming one over time. It is under constant development and improvement, and if you tried it back when it was first released and didn’t like it, I urge you to give it another spin. I find myself using it more and more because I really like the feel of it.

One thing about Azure Data Studio I’m not too keen about, though, is that many of the keyboard shortcuts are different. One keyboard shortcut that’s particularly helpful to me is using Ctrl + E to execute queries. I realize that F5 is the most common key to execute a query, however on most laptop keyboards you now need to hold an additional key to make the function keys behave like function keys. For this reason, Ctrl + E is a wonderful and quick alternative, but it doesn’t work in Azure Data Studio. Or didn’t, until now.

Fortunately, Azure Data Studio is designed to be expanded upon with extensions from both Microsoft and the community. In the case of keyboard shortcuts, a particularly helpful one is called SSMS Keymap, which ports many popular SSMS keyboard shortcuts into Azure Data Studio. With this extension,  Ctrl + E is once again an option, and I no longer have to click “Execute” with a mouse, or fumble to find my laptop’s F5 equivalent.

If this sounds appealing, try installing the SSMS Keymap extension yourself. Here’s how:

At the toolbar on the left, click the “Extensions” icon, or type Ctrl + Shift + X. This will open the Extensions view.

In the Extensions search box, start typing “SSMS Keymap”. The SSMS Keymap extension should appear in the results.


Clicking on the SSMS Keymap result will bring up a screen with more information about the extension. Clicking the green “Install” button will redirect you to the SSMS Keymap GitHub page, where the actual .vsix installer file can be downloaded. Download it.

At the top of the Extensions view is an ellipsis. Click it, and then choose Install from VSIX. Select the .vsix file you downloaded.

Azure Data Studio will prompt you to restart.

Congratulations, you did it! Now you can enjoy the SSMS keyboard shortcuts you love in Azure Data Studio!