Forum Discussion
Nidhi_Sonar_123
3 years agoRegular Visitor
Need Help in calling and getting data from rest post api which returns excel file in response
Hello Everyone,
I have a post api which takes the payload as below :
{"DateFrom":"2022-12-26T18:30:00.000Z","DateTo":"2022-12-29T18:29:59.000Z","TimeZone":"India Standard Time"}
process the data and generates an excel file in response.
I want to call this api from power query(blank query) and read data from this excel file.
Could you please suggest how we can achieve this?
Thanks in advance
3 Replies
- lbendlinSuper User
Run a standard Web.Contents() call and then click on the resulting [Contents] link. Power Query automatically recognizes that the contents is an Excel file.
- Nidhi_Sonar_123Regular Visitor
Hi Ibendlin,
Thanks for your solution.
Could you please provide some example where we have the similar scenario and we have handled, or any link which describes the solution.
Thanks in advance
- lbendlinSuper User
let Source = Excel.Workbook(Web.Contents("http://192.168.3.26/historydownload.xlsm"), null, true), #"Field Changes_Sheet" = Source{[Item="Field Changes",Kind="Sheet"]}[Data] in #"Field Changes_Sheet"