Hi all,
Hoping there is an easy way to do this - seems straightforward, but couldn't quite get what I needed in the forums.
I have an excel file with 10 sheets (tabs) - the input file
I have created a workflow to bring in and modify one of these sheets only.
I need to do the following:
1. Copy over the input file into a different folder - all the data should stay the same, including sheet names, file name etc,
2. Overwrite the one tab from my Alteryx workflow that I have changed into this newly created copy - the sheet name remains the same
Any ideas?
Many thanks!
Solved! Go to Solution.
Instead of creating a copy of the excel sheet at the very beginning, you could have the modified output to a new excel sheet. That been the case. That being the case, are you importing all the sheets or only the one you wish to modify?
I created this workflow to do this
First you have to do a batch to copy the files and put into events to "Before run" (the command that I created:
"@echo off
copy C:\Users\DouglasPerez\Downloads\Pasta\1\Book2.xlsx C:\Users\DouglasPerez\Downloads\Pasta\2\Book2.xlsx"
)
Then the workflow will update the sheet!
Hi both,
Thanks for the replies!
I want to basically duplicate the input excel file with all its 10 tabs into a different folder location, then just modify a single tab based on the existing workflow.
What is a batch to copy the files? Is that a workflow tool?
The batch is a .bat file, you have to create it with the parameters:
copy <current full path> <new path>
(if you dont know what a bat file is: https://en.wikipedia.org/wiki/Batch_file)
And save into a ,bat file, then use the events tab:
This will copy the excel to another folder before the workflow run
Hi Doug,
Thanks a lot for the reply and the workflow.
Is this really the easiest way? There is no other way in Alteryx just to copy and paste the same excel file with all its tabs to a new folder without running a batch file?
You can make a macro to do this, but it will use a bat file...
Another solution is to read all the sheets and then create a new file on the new folder, I would do a Interactive macro with dynamic input in this case (but is a hardest one)
Use a blob input tool and blob output tool. Check the "Copy Formatted Contents to Another Excel File.yxmd" workflow provided here: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Copy-Formatted-Contents-to-Ano...