Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

<NEED HELP> want to read the excel file regardless of the sheet name

AndyHH
7 - Meteor

Hi all! Let me simply explain what I need to fix.

I have one excel, and in that excel will have one sheet. And for the sheet, we are not sure what the sheet name would be. Sometimes is :Enquiry(1), sometimes is :Enquiry. But the format is fix this is certain.

But what I faced is that if the sheet name changed, I cannot run the model since it would say "does not match a sheet name or the excel file is corrupt".

Attached is each screenshot for the steps, could anyone advise which step is wrong?

(and another question is that, what I put into template file, I named the sheet name in excel "enquiry", so I assume no matter what name of the input file's sheet name, it would be ok to read. MAYBE is this step I'm wrong but not sure. How do I let it calculate no matter what the sheet Name of input is? Thanks a lot~!)

 

(What i use is dynamic input which advised by other answer but failed for me, if you have other method please advise! Thank you)

2021-10-20_15-04-46.png2021-10-20_15-05-07.png2021-10-20_15-05-23.png

4 REPLIES 4
binay2448
11 - Bolide

You can use Directory tool for that, find attached example it is working fine in your condition.

gawa
15 - Aurora
15 - Aurora

Hi, @AndyHH 

 

I recommend to modify Formula expression as follows:

gawa_0-1634801275293.png

2 things.

It seems that sheet name may contain parenthesis(). For some reason, character with parenthesis cannot be correctly replaced by REGEX_Replace, so just use Replace function.

 

Also, It seems that sheet name may contain white trailing space. In that case, you have to put single quote at before&after sheet name.

 

Hoping this would help you.

AndyHH
7 - Meteor

@binay2448 cant use directory, since i will have 2 excel and needed to calculate them separately

binay2448
11 - Bolide

@AndyHH , May be you can filter only one file after directory tool but it is up to you according to your requirements.  

Labels