Alteryx Designer Desktop Discussions

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

How to extract sheet name in Alteryx when using an excel xlsx input

anayet1988
8 - Asteroid

Use a formula tool:

 

1. REPLACECHAR(RIGHT([FILENAME],FINDSTRING(REVERSESTRING([FILENAME]),'|')),'`$','')

 

or

 

2. Substring([FileName],FindString([FileName],"`")+1,length([FileName])-FindString([FileName],"`")-3)

 

Both formulas achieve the same result. This only works if you have used fullpath as the filename

3 REPLIES 3
BrandonB
Alteryx
Alteryx

Regular expressions also work nicely: 

 

BrandonB_0-1655906332258.png

 

MichelleL
Alteryx
Alteryx

@anayet1988 - Just throwing out an idea . . . might be too simple . . . have you tried the 'Import only the list of sheet names' option on the input.  If you then also include the Full Path, you'll get both the Full Path and the Sheet Name already separate.  If you then need to bring in data from all or specific sheets, you can use a filter to specify which sheets, and then a Dynamic Input Tool to bring in the data.

 

MichelleL_0-1655911530242.png

 

anayet1988
8 - Asteroid

Thank you for everyone's responses

Labels