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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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 ;).
chrome-9xf-Zagzel-B

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.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

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 ;).
chrome-9xf-Zagzel-B

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.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors