Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Download excel file from a URL failed

JokeFun
8 - Asteroid

I am trying to download the excel file from URL like below. But it failed as I tried several times. There's a message "access denied" in the download data in one of the tries. 

Could someone help on this? Maybe just build a simple flow to download this one?

http://www.safe.gov.cn/safe/2020/0731/16814.html

 

So this is just a start. If that can be done, actually I need to download the file dynamically in this URL according to the month selected.

http://www.safe.gov.cn/safe/gzhbdmyzslb/index.html

 

As I see, the number after the date changes for each. Not sure how to configure that either.

http://www.safe.gov.cn/safe/2020/0930/17259.html

 

BTW, sorry that the web supports Chinese characters only.

8 REPLIES 8
grazitti_sapna
17 - Castor

HI @JokeFun , for me this seems to work fine please refer to the screenshot.

grazitti_sapna_0-1602753659368.png

 

 

Also I tried passing your link-

http://www.safe.gov.cn/safe/gzhbdmyzslb/index.html

 

After this I applied some transformations and fetched the links with dates.

grazitti_sapna_0-1602754840259.png

 

Is this what you are looking for?If yes, kindly mark this post as solution.

 

Thanks.

 

Sapna Gupta
JokeFun
8 - Asteroid

Hi @grazitti_sapna ,

 

Thanks a lot! Would you please kindly share the file?

 

Cheers!

grazitti_sapna
17 - Castor

HI @JokeFun , I have just created a workflow for the first part that is to fetch the links with dates from the index link, I am working on it to create a workflow where you can fetch the files as well and I think a macro will be a better approach to make it work. What do you think shall we give it a try using a macro?

 

Also, attaching the file for your reference.

 

One more question are just looking to fetch a file attached with this link "http://www.safe.gov.cn/safe/2020/0731/16814.html" or other links as well?

 

Thanks.

Sapna Gupta
grazitti_sapna
17 - Castor

Hi @JokeFun , please refer to the attached workflow to download all the files related to the links.

 

If this helps kindly mark this post as solution.

 

Thanks.

Sapna Gupta
JokeFun
8 - Asteroid

Hi @grazitti_sapna ,

 

Thanks very much for the great help.

 

I tried to open the yxmd file, but failed to start the Macro since my Alteryx version is 2020.1.5 and it says it does not support the tools built in newer versions.

 

 

JokeFun
8 - Asteroid

@grazitti_sapna with this one, It also has version problem. And when I ran it, it failed as below picture shows.

download tool.png

grazitti_sapna
17 - Castor

Hi @JokeFun , here is the downgraded version of the macro attached, to downgrade the version of the workflow you can open the workflow in the notepad and change yxmd version.

Regarding the error issue, here is the screenshot, I am able to fetch the data.

 

grazitti_sapna_0-1603081108684.png

 

grazitti_sapna_1-1603081129188.png

 

You can check with your IT team regarding this issue and as said our versions are different so give this a try if it works for you.

 

In, headers you can add this configuration.

grazitti_sapna_2-1603081188681.png

 

Name         Value

User-AgentMozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

 

 

Another possible solution is :  

In the Download tool configuration, uncheck "Encode URL".

 

If it still doesn't work kindly refer to this post as I suggested earlier you need to check with your IT team.

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Download-Fail-Proxy-Authentication-iss...

 

I hope this works for you.

 

Thanks.

Sapna Gupta
JokeFun
8 - Asteroid

Hi @grazitti_sapna , Thanks a lot! I have to check with our technology on this as I tried all your suggestions with no progress.

Labels