# Power Query: CurrentWorkbook file contents



## cr731 (Mar 14, 2016)

How can I create a query that points to a worksheet in my current file?  If I use

Source = Excel.CurrentWorkbook()

This returns just a list of Tables, not Sheets.

I need to get the same effect as File.Contents but for the CurrentWorkbook.

What is the syntax for this?


----------



## ImkeF (Mar 14, 2016)

Yes, this is one of the very strange things: Sheets are only shown if accessed "from outside".

So you do just that: Access the sheet from your current file by opening it (from outside) again: Excel.Workbook(File.Contents("FilepathOfCurrentFile.xlsx"), null, true)


----------



## ImkeF (Mar 14, 2016)

Forgot to mention that this means that the file needs to be saved after you've updated the content of your sheet (as it is a look from outside to your current file).


----------



## anvg (Mar 14, 2016)

Hi
A variant How to auto-parametrize your Power Query queries – The BIccountant
Regards,


----------

