We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Select specific tabs from different excel files in different folder and append them

RachelMa
5 - Atom

Hi,

 

Does anyone know if it is possible to extract tabs from files and then combine them? The structure of the data looks something like below:

 

Folder -> Multiple Files -> Desired File -> Multiple tabs in it

Folder -> Multiple Files -> Desired File -> Multiple tabs in it

....

Folder -> Multiple Files -> Desired File -> Multiple tabs in it

(Total of 27 Folders)

 

I managed to filtered out all of the individual desired files using the Directory Tool, but I am stuck on how to pull out the tabs I want. The files have different names but the tabs I want have the same schema and name. 

 

Can anyone help me with how to solve this problem? Thank you!

 

2 REPLIES 2
AngelosPachis
16 - Nebula

Hey @RachelMa ,

 

Do you have a list of all the different sheet names? One way to go about it is to use an append fields tool after your directory tool, to append all sheet names to each Full Path.

 

Then with a formula tool, you have to create the New Full Path Name, that contains the Sheet Name in it

 

AngelosPachis_0-1618551566725.png

 

 

Finally, with a dynamic input tool, you can define one of the files you have as an Input Data Source template (you can select any sheet in that file) and configure the tool so itr eads a list of data sources from the New Full Path you have created earlier. 

 

AngelosPachis_1-1618551670509.png

 

If your files have the same schema as you said, the dynamic input tool will be able to read all data from them.

 

EDIT : Posts by @mceleavey in the following thread might also be of help, he describes how to do that if you only need to keep a single sheet from multiple files.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamic-Input-Tool-Import-Multiple-Exc...

 

Hope that helps.

 

Angelos

RachelMa
5 - Atom

Hi Angelos,

 

Thank you for your advice! So I built the following workflow after looking through the post by @mceleavey, but I am still having issue. The dynamic input tools does not seem to be able to find the sheet I want out of the files. 

RachelMa_0-1618586994414.png

 

RachelMa_4-1618587938713.png

The 28 are all the files I need to pull tabs from. The 9 records are the number of rows in the sheet I chose as example in the dynamic input tool. I'm not sure why there are only 9 records. There should be somewhere around 9*28 records if it is working correctly. 

 

RachelMa_3-1618587702795.png

The error message is following by the pull path without of sheet name.

 

This is the last part of the FullPath column in the dynamic input tool so I know the formula should have worked. It added the sheet name I want.

RachelMa_2-1618587579367.png

 

Configuration page of the dynamic input tool:

RachelMa_1-1618587540839.png

 

I apologize if my explanation is confusing. I am totally lost LOL

 

Labels
Top Solution Authors