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)
Hi, @AndyHH
I recommend to modify Formula expression as follows:
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.
@binay2448 cant use directory, since i will have 2 excel and needed to calculate them separately
@AndyHH , May be you can filter only one file after directory tool but it is up to you according to your requirements.