Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowHi All,
I have a Excel workbook to load in Power Query using Excel.CurrentWorkbook() fuction but this does not return any result.Please may I have help correct me.
Solved! Go to Solution.
Hi @han_rj,
Thank you for being a part of Microsoft Fabric Community Forum!
Excel.CurrentWorkbook() is designed for use inside an Excel workbook’s own Power Query environment. It returns tables and named ranges within the same Excel file.
In Power BI Desktop, there is no “current workbook” concept. The .PBIX is not the same as an Excel workbook. So, calling Excel.CurrentWorkbook() from within a .PBIX will simply return an empty result or error because Power BI has no reference to an Excel workbook in memory.
Instead of using Excel.CurrentWorkbook(), select Get data, Excel workbook and choose your .xlsx file.
This is the most straightforward way to load Excel data into Power BI.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Regards,
Sahasra.
Hi @han_rj , Could you checj these please
No Tables: Ensure that your workbook has properly defined Excel tables or named ranges.
File Format: Excel.CurrentWorkbook works only with Excel workbooks in .xlsx or .xlsm format. If your file is in .xls or another format, save it as .xlsx and try again.
Power Query Settings: Ensure you're working with the correct query editor and accessing the desired workbook.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance
Yes the above all is there.
Please correct my steps
1. Open new PBIX file in POwer BI desktop
2. Power Query > New Source > Blank Query>
= Excel.CurrentWorkbook()
Hi @han_rj,
Thank you for being a part of Microsoft Fabric Community Forum!
Excel.CurrentWorkbook() is designed for use inside an Excel workbook’s own Power Query environment. It returns tables and named ranges within the same Excel file.
In Power BI Desktop, there is no “current workbook” concept. The .PBIX is not the same as an Excel workbook. So, calling Excel.CurrentWorkbook() from within a .PBIX will simply return an empty result or error because Power BI has no reference to an Excel workbook in memory.
Instead of using Excel.CurrentWorkbook(), select Get data, Excel workbook and choose your .xlsx file.
This is the most straightforward way to load Excel data into Power BI.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Regards,
Sahasra.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
29 | |
23 | |
18 | |
15 | |
10 |