Alteryx Designer Desktop Discussions

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

Input Data from Excel - There were Errors: Input Data (4): Corrupt File: XML parse failure

robertfishel
8 - Asteroid

Hello my fellow Alteryx enthusiasts.  This is my second post on the discussion board.

 

I have created a workflow that I am running as an application with the magic wand button.  The application is really simple, with a File Browse Tool, an Action Tool and a Input Data Tool.

 

Capture a.PNG

 

The data that I am inputting is from an Excel .xlsx workbook which contains data on the first sheet.  However, the first six rows of the worksheet contain header information, row 2 in particular being one long merged row that goes from column A to column DM.  Row seven actually contains individual column headings, so I have set the input tool to begin reading from seven.  However, I get an error when trying to run the application stating that there is an XML parse failure and the file is corrupt. 

 

Capture b.PNG

 

If I open the workbook, and select from column AT (which is the last column with actual data) all the way to column DM, and delete those columns, then save the workbook, the application will input the worksheet no problem.  So I am wondering how to get Alteryx to input the worksheet without having to open it and delete a lot of columns on the far right of the worksheet. 

 

It is as though Alteryx is detecting data in columns AU through DM, even though there is nothing in these columns, and I am wondering if that is because of my merged row 2, which stretches all the way from column A to column DM.  I would think that telling the input tool to begin importing data at row 7 would skip past row 2 and its being merged, but this does not seem to be the case. 

 

Any suggestions? 

12 REPLIES 12
DavidP
17 - Castor
17 - Castor

Hi Robert,

 

The app attached to this post (specify excel range in input tool.yxwz) does what you describe. It's the same app I attached two posts ago where I explained the formula

 

Replace([#1],"$", "$A7:AT") for the Action Tool.

 

It's also pretty close to your app.

 

You do have to select an input filename for the input tool when you set up your workflow. It's just a placeholder and at run-time the action tool updates the filename variable in the input tool with the value obtained from the file browse tool and loads that file.

 

When you choose your file with "Select your Excel file", the app also asks you to specify a Sheet. You have to select Sheet1 (or whatever Sheet you want to load). The formula in the Action Tool then inserts the range A7:AT into that filename with the Sheet name specified before it is sent to the input file to ensure that only the specified range is loaded. If you select List of Sheet Names, the formula as it is currently written won't work.

 

I don't think the dynamic input tool is the way to go here, as the normal input tool does what you need.

robertfishel
8 - Asteroid

You, sir, are a gentleman and a scholar.  I appreciate your patience in working with me.  Hopefully, others will benefit from this thread.  I know I have!

DavidP
17 - Castor
17 - Castor

You're very welcome. This is what the Community is for.

Labels