In the course of my workflow, I need to import 3 tabs from an Excel file and then export them, with no changes, to another Excel file. I will pick up things after that happens. I have read elsewhere that I can use an input tool for each tab and then an output tab for each, but that doesn't work as the output workbook is in use for the 2nd and 3rd tabs. I can't use a Block Until Done tool as I can't connect the 2nd and 3rd outputs to another input tool.
How can this be accomplished? Thanks!
Solved! Go to Solution.
Seems like you just want to copy a file and paste to another fill name? If so, the Blob tools may be an option: Solved: Copy and Paste Excel from one folder to another an... - Alteryx Community
@alexnajm It's a bit different than that, the source workbook has 4 tabs and I only want to copy 3 of them to the destination file, which has a total of six tabs. Would the Blob tools work for that as well? It's not just a straight move of the entire file
I am not sure what you data looks like but
What I have done in the past is to use an input to bring just the excel tab names. one input to get just the tab names (step1.png)
I then added a formula tool to add the full file destination and dynamically add the tab name. (step2.png)
The dynamic input tool was then used to bring in all of the data into one flow. (step3.png)
Use another formula tool to create a column that identify what tab it needs to go on the new file (simple formula tool adding a column to the dataset)
Formula tool to create file path for where it needs to go (Step5.png)
output tool utilizing the bottom setting to dynamically write the output based on the file path created in the previous step. (Step6.png)
Again, not sure what your data looks like but this is how I have done it in the past.
@Jfoss This sounds very logical, I am leaving soon, so I will try this out 1st thing Monday morning. Grazie!
did it work? kinda threw a dart in the dark and would love to know if it solved your problem
I thought it would, but I kept getting errors about the sheets having different schemas. So I am having to resort to trying to get some python code in the python tool to work. Thanks for al the screen shots though! Helped me to try and implement.
@ppatane if you are getting a different schema error, use the batch macro instead of the dynamic input tool. Sample workflow attached. The output file will be saved with the name of the input file followed by "_Copy" in the folder where the input file is saved
@binuacs I think this is going to be the solution, but I am currently unable to tweak this to my needs. I need to move spreadsheet tabs "Load File", "Excel Format", and "Detail" from \\data1\user2\ppatane\Files\original data.xlsx to \\data1\user2\ppatane\Output\output data.xlsx. My Regex skills are quite minimal, so your solution worked well for the file names and locations you used but I failed at editing to get the results I need, Can you explain to me how i put in the proper paths. I can adjust the tab names