Forum Discussion
=Excel.CurrentWorkbook()
Hi Analitika ,
This is a function expression so it does not expect any parameters. If you leave has is it will give you am option to invoke the function that will get all the tables ni the excel file (if you do not have any tables this will return an empty table).
If you know the exact table name you need you can change this syntax by adding the name of the table something similar to:
= Excel.CurrentWorkbook(){[Name="TableName"]}[Content]
This will invoke the table and you will get the information without the need of addittional steps.
- AllisonKennedy5 years agoCommunity Champion
Analitika
You can use M code in Power Query in Excel as well as in Power BI. When you use Power Query in Excel, you can use the Excel.CurrentWorkbook function. https://support.microsoft.com/en-us/office/power-query-overview-and-learning-ed614c81-4b00-4291-bd3a-55d80767f81dAs MFelix said, here is an example of the 'Source' step when I click the 'From Table' button in the 'Data' tab in the ribbon in Excel and use an Excel table as the source for my query:
= Excel.CurrentWorkbook(){[Name="Table1"]}[Content]
This says, look for Table1 in the current workbook (same workbook as the report is being built using Power Query).
If you're using Power BI your Source step might look more like Greg_Deckler 's example.
- FrankAT5 years agoCommunity Champion
Hi Analitika
CurrentWorkbook is the workbook you're in and using Power Query. Power Query lists in a dialog all the items in this current workbook that are in this workbook.With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)