Alteryx – Get SheetNames from Excel file

Once the base Macro is set, we now need another macro which can spit out the sheet names from a given excel file. Perform the following steps to create this macro –
1. Drag in ‘Input Tool’ and connect to any of the existing excel file say ‘Movies.xlsx’. On connection, chose the option – Import only the list of sheet names ( as shown below ). Additionally in the configuration pane of the tool set ‘Output File Name as Field’ to ‘Full Path’

2. Drag in a ‘Formula’ tool and create a new field ‘FullPath’ with the following formula
TrimRight([FileName],'<List of Sheet Names>’)+”‘”+[Sheet Names]+”$’”
3. Drag in a ‘Select’ tool and deselect everything but the ‘FullPath’ field.
4. Drag in a ‘Macro Output’.
Here is how it should look like –

Run the workflow and ensure full path is being shown –

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s