Exporting Power Query/M Queries To ODC Files In Excel 2016 Get & Transform

A really useful new feature was added to Get & Transform (the functionality previously known as Power Query) in the latest updates for the Office 365 click-to-run version of Excel 2016: the ability to export and import ODC files containing M queries. This makes sense given that Get & Transform is the new default way for loading data into Excel, but it’s nonetheless very welcome.

It’s very straightforward to use, and all the details are available in the section on “How do I get data from recently used sources, Office Database Connection (ODC) files, other workbook connections, or tables?” halfway down this article:

https://support.office.com/en-us/article/Unified-Get-Transform-ad78befd-eb1c-4ea7-a55d-79d1d67cf9b3?ui=en-US&rs=en-US&ad=US&fromAR=1

You just need to right-click on your query in the Queries & Connections pane to export it:

image

…and after that you can import the ODC file in the normal way when you want to create a new connection.

As always, I want more though. Some ideas/requests:

  • Power BI Desktop should be able to import and export ODC files in this format too: it would make it much easier to reuse queries. Vote here if you agree.
  • Power BI should have a central repository for Power BI and Excel users to store these ODC files for easy sharing and reuse by report developers. It’s a shame that the Azure Data Catalog integration with Excel/Power BI hasn’t had any love recently because that would have been the obvious place to create such a repository.
  • We also desperately need some kind of source control for M queries inside Excel and Power BI (not quite the same requirement as the previous point). I know a lot of people are doing this manually with services like Git, but I would love to be able to check my code in and out directly from the Query Editor.

I’ve also noticed that the old “Load To” dialog (that I found incredibly confusing) has been replaced by the standard Excel Import Data dialog in this release – another improvement. After you hit Close & Load in the Query Editor, this is what you now see:

5 thoughts on “Exporting Power Query/M Queries To ODC Files In Excel 2016 Get & Transform

  1. Nice, and I vote the Idea “ODC equivalent for Power BI Desktop”.
    and I hope odc on Azure Analysis Services, SQL Server Analysis Services.

    Regards,
    Yoshihiro Kawabata

  2. Hello, I have the last version of excel 2016 however “export connection file” is not visible. Can you please support me with the solution?
    Thank you

  3. Hello, I am having the same issue as Jose. I am using Excel 2016 and “export connection file” is not visible. The strange part is that it was visible earlier today and I was using the created odc files from various workbooks. Now I can no longer create odc files from power query. Can someone please advise what might have happened and how to fix this issue? Thanks in advance!

Leave a ReplyCancel reply