Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Junaid11
Helper V
Helper V

Script for Power Query

Hello,

I am looking to have a script written in power query in Power BI which reads an excel sheet, makes a call to an API and populates the table. Is this possible to achieve? Help would be appreciated.

Thank you

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @Junaid11 

 

What do you read from an Excel sheet? To get data from Excel, you can use Excel Workbook connector. To get data from an API, you can use Web connector. You can also write M codes to provide more custom information to Web.Contents() function to call an API. 

 

If you store variables (to be used in API) in a column in Excel, you can first connect to this Excel file to get data. Then add a column by invoking a custom function to call an API. This new column will have all data returned by API. Expand it to see all data in the table. 

 

Here are some tutorial videos for your reference. 

Use Power BI to loop through multiple pages of an API - YouTube

Scrape Data from Multiple Web Pages with Power Query - YouTube

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

KNP
Super User
Super User

Yes

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Hello @KNP ,

May I know any source from where I can see that practically been done. It woukd be quite useful.

Thank you

Hi @Junaid11,

 

Would you be able to provide more detail about your specific issue so I can better answer your question?

This post may be useful in helping you structure a question to better get the support you need.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M6071...

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Hello @KNP ,

May I know any source from where I can see that practically been done. It woukd be quite useful.

Thank you

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors