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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors