Hi Alteryx Community,
I’m working with an Excel file that contains multiple sheets:
One sheet (e.g., "Full Data") contains column headers and full data.
The other sheets (e.g., "DataOnly1", "DataOnly2", etc.) contain only data without headers.
Each sheet has the same structure (same number and order of columns), but only one sheet provides the correct column names.
I would like to create a macro in Alteryx that:
Takes sheet names dynamically as input (e.g., from a list).
Reads each sheet, whether it has headers or not.
Applies the headers from the “Full Data” sheet to the data-only sheets.
Combines all sheets into one unified dataset.
Once the macro is built, I plan to use it inside my main workflow and connect it to the Directory Tool to loop through multiple Excel files and process all their sheets accordingly.
Sample data sets are below. Thanks!
Person Number First Name Last Name Department
| 1001 | John | Doe | HR |
| 1002 | Alice | Smith | Finance |
| 1003 | Bob | Jones | IT |
| 1004 | Sara | Khan | Admin |
| 1005 | Eva | Wilson | Sales |
| 1006 | Tom | Hall | HR |