Alteryx designer Discussions

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

Output Filen Name as Field - Tab Name

Highlighted
Atom

I have 36 tabs within one excel file (sales data by month for 3 years) and I've written a workflow to aggregate all of the sheets into one file, however I'm trying to add the sheet name as a field at the end. while there's the option to 'output full path as field' and then use a text function to pull the sheet name, does anyone know of a better way to add the sheet name as a field in my aggregated file?

 

using alteryxx64, v. 10.6.

Alteryx Alumni (Retired)

You can use a batch macro to load the files. The control parameter reads in the sheet name and replaces the sheet name in the input tool, and then you also use a Formula tool to create a new field. Each sheet is processed one at a time and the tab name is inserted.

 BatchMacro-ExcelSheetnames.png

In the Attached Example I have an excel spreadsheet that has 55 tabs, the tab names has a year and the name of a county in CA. Neither the county name or year is contained in the data on the tab therefore I need the sheet name to know where the data is from and process it.

pamW
Labels