Free Trial

Alteryx Designer Desktop Discussions

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

Inserting tabs into larger Excel file based on criteria

insomned
8 - Asteroid

Hi there, 

 

Not really sure how to start with this one, I have 3 tabs that need to be inserted into a larger Excel file, based on some matching criteria. By this I mean that there is more than 1 Excel file that needs 3 specific tabs inserted, and the matching criteria is in the other tabs that the Excel file has.

 

I think of letting the user insert a directory where the tabs are located and then inserting the tabs into larger Excel files (templates) with the Alteryx workflow.

 

But how is it better to do this with Alteryx? 

 

Thanks a lot for all your help!

1 REPLY 1
mceleavey
17 - Castor
17 - Castor

Hi @insomned ,

 

as you have not provided any data I'll just explain an approach to this.

To create different tabs on an existing file you need to dynamically create the fullpath, including the tab name, which will be in the format:

C:blahblah/blahblah/Excelname.xlsx|||Sheetname

The |||Sheetname is your tab name in the Excel workbook.

You then use the output tool with the "Take File/Table Name From Field" option enabled, and the fullpath field is used to overwrite the enter file path:

 

mceleavey_0-1676989217627.png

I would recommend you put this into a batch macro and use the fullpath as the control parameter to avoid trying to write to the file while the previous tab is being written.

 

I hope this helps,

 

M.



Bulien

Labels
Top Solution Authors