Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello
I have several SQL statments that I need to load into Excel sheets in an Excel file.
Can you tell me how to do that smartly please without having to put them one by one?
Thanks!
Solved! Go to Solution.
@Anonymous
As far as I know, there isn't a smart way other than doing it 1 by 1, you can only select one worksheet to implement a statement at a time:
How to Embed a SQL Query in Microsoft Excel: 13 Steps (wikihow.com)
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@Anonymous
As far as I know, there isn't a smart way other than doing it 1 by 1, you can only select one worksheet to implement a statement at a time:
How to Embed a SQL Query in Microsoft Excel: 13 Steps (wikihow.com)
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
You want to pull the SQL from the text file and then execute them in the query editor? Or are you willing to manually make each query using those SQL queries within the same workbook? The latter is easy, the former is trickier but doable.
For the former, you just need to put your SQL into the Advanced options box for each query. Here is a link.
Power Query SQL Server connector | Microsoft Docs
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Not sure what you mean. Please clarify. You have multiple SQL statements and you want to load them into separate Excel workbooks? worksheets? where is the SQL stored?
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I want to load them into separate excel sheets in the same excel file.
It is currently stored in a text file.
Thanks!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |