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

Downloading Excel File from a URL

fitzgerald2022
7 - Meteor

I receive and email from our training software that includes a URL Excel file link for the excel data.

Example: www.compliancewire.com/CustomerData/Temp/sample.xlsx (The data is confidential so I couldn't use a real url)

 

I am trying to use the download tool to download this file and then use a dynamic input tool to use the data.

 

When I configure the Download Tool to Output to a File it works and I can open the file with excel. When I attempt to use the dynamic input tool (or a regular input tool) I get the following error:

 

Error: Input Data (5): Target Excel file may be corrupt! Cannot find required file, or element within file: xl/styles.xml

Also when I try to choose a Table Name the there are none I can click

 

What I have tried

  • Changing the .xlsx file format to xls, xlsm, etc

 

 

 

 

12 REPLIES 12
jamielaird
14 - Magnetar

Hi @fitzgerald2022 ,

 

I couldn't see a file at that URL (so used another) but does the attached do what you were looking for?

 

Screenshot 2019-04-04 at 20.29.59.png

 

------

If I have solved your query please mark this solution as accepted - thank you!

fitzgerald2022
7 - Meteor

That is what I want it to do but it doesn't work with my specific url. I can't give you my specific url because it contains confidential information but I think it is sent in a newer version of excel than the example you gave me.

 

When looking at the Header information I noticed a difference in the content types

My URL Header Information:

HTTP/1.1 200 OK
Date: Thu, 04 Apr 2019 20:00:54 GMT
Connection: Keep-Alive
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv
Last-Modified: Wed, 03 Apr 2019 14:18:13 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Content-Encoding: gzip
Age: 0
Accept-Ranges: bytes
Content-Length: 63434

 

Your URL Content Type:

HTTP/1.1 200 OK
Date: Thu, 04 Apr 2019 19:45:17 GMT
Server: Apache/2
Last-Modified: Thu, 05 Jul 2018 12:25:28 GMT
ETag: "17d5d-5703fa47dadc5-gzip"
Accept-Ranges: bytes
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Transfer-Encoding: chunked
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

fitzgerald2022
7 - Meteor

I can do a save as of the temp document and then it works fine with my regular input tool and dynamic input tool

jamielaird
14 - Magnetar

It definitely seems like something to do with the encoding of that specific Excel file. It looks like errors with "/xl/styles.xml" are a known issue in Excel. One of the suggested fixes is to save as .xls instead of .xlsx which you could do by amending the filename, but you did say in your original message that you'd already attempted changing the extension. Hmm - tricky one!

fitzgerald2022
7 - Meteor

Yeah I have tried saving it as an xls and it wouldn't work. I wasn't sure if there was a tool that could change the encoding after downloading or something like that. This has been very tricky and driving me nuts!

fitzgerald2022
7 - Meteor

I found a solution to the problem

 

  1. I saved the download .zip file
  2. Using the dynamic input tool I found the sheet1.xml file and checked the Return Outer XML option
    • This allowed me to see every row in the excel sheet
  3. Parsed out the data I needed
jamielaird
14 - Magnetar

Nicely done!!

_Jesse
5 - Atom

@jamielaird this is great!  Thanks for sharing. 

Panchnachi
5 - Atom

Hi Zackfitz,

 

Thanks for this solution.

 

But in my case, the download file is a direct .xlsx file and not a zip file. I am still facing the issue.

 

Would it be possible for you to share the workflow here?

 

Regards,

Panch

Labels