Alteryx: Directory tool with differently named sheets in a workbook

Category:
Question ID: 109793
2
0

I am trying to automate a process that reads in several xlsx workbooks. The sheet names on these workbooks change periodically so I cannot hard code the sheet names. Is there a way to get the sheet name for each of these files?

 

Thanks.

Marked as spam
Posted by (Questions: 14, Answers: 0)
Asked on August 19, 2020 4:17 pm
9 views
Answers (1)
2
Private answer

Assuming I understand your question correctly, you have a directory with multiple workbooks with different sheet names. For example:

Workbook1.xlsx|||SheetOne

Workbook2.xlsx|||SheetTwo

And the names of these workbooks and sheets may change. I would use the directory tool in conjunction with a macro that iterates through these to grab the sheet names.

In the macro import a list of sheet names on an xlsx file with two controllers attached- one to replace the file path name, and the second to replace the '<List of Sheet Names>'. In the main workflow you can join records by position and you will have the full file path and sheet name for every file in the directory.

 

Hope that helps!

Attachments:
Marked as spam
Posted by (Questions: 0, Answers: 14)
Answered on August 19, 2020 5:46 pm