My series about common patterns for loading data using Power Query received quite a lot of interest over the last few weeks. You can review those articles in the links below
- Combine all files in a folder with Power Query.
- Load the Latest Version of a File with Power Query.
- Combine all sheets in a workbook
The other day I was helping a client and he asked me about another scenario; import the first worksheet from a workbook, what ever it is. I thought this would be a good extension to the above articles.
Actually, the process I show you here can be used to import the first “anything” from a list. It doesn’t matter if it is the first sheet in a workbook or the first file in a folder, or what ever, the priisolution is still the same.
Import Only the First Sheet in a Workbook with Power Query
There are a couple of tricky issues to overcome with this scenario.
- Write the query to give you a list of sheets in the workbook.
- Make the query work regardless of the name of the first sheet, so it loads the first one in the workbook regardless of its name.
I cover these tricks in my video below.
Want to Learn Power Query in a Structured Way?
My Power Query Online training course consists of 7.5 hours of online video training material that will teach you everything you need to know about using this fabulous tool for both Power BI and Excel. You can watch some free sample videos and find out more about registration following the link above.