Forum Discussion
Connecting to an Excel in https://wcs.bsnconnect.com/sites/
- 3 years ago
Hi,
If you can open that file via web browser it doesn't mean you can open it as easily using PowerQuery as the browser additionally runs the javascript that might have redirects etc.
Postman or curl or the snippet below should reveal the actual server response - which you mention it's a HTML - and starting from that HTML response we'll see where to go next and if it's easy.
let serverResponseAsText = Text.FromBinary( Web.Contents( "put-web-address-here" ) ) in serverResponseAsTextIF you decide to paste the serverResponseAsText here, PLEASE remove confidential information.
Hello, thanks!
In the meantime what I did was to try and access the URL from the browser without the Excel file in the path - and I did not have access. So I asked for it... I am not sure if I was given it in the meantime (I have no notifications), but all of a sudden the Web/Excel connection started working. Still, I am interested to learn more about how you would debug this. I have gotten the response from the server and it came as 800 lines of text. What do I have to look for? I am hesitant to copy and paste it here because I am not good enough to understand the confidential information that might be inside it....
- ams13 years agoResponsive Resident
Happy it started working.
If you would have used the snippet I gave you before - when you didn't have access -, probably you would have seen what you saw in your browser -> a HTML page saying forbidden, access denied or something in the sorts of.
In the absence of curl, Postman etc., that query is IMO a solid base for further investigations -> you will see there in plain text: json, HTML etc.