This is my first attempt at building an Alteryx workflow, so I'm sure I'm missing something simple, but I am trying to set the workflow to output to the folder designated by the user at the beginning of the workflow. I tried using a wildcard in the output file and I couldn't get it to work. There are four separate outputs that are all saving a separate tab to the same file. I am away from my computer at the moment, but when I get back I can post some screenshots.
Solved! Go to Solution.
Hi @Bwink88
The macro you posted requires some custom macros, XLSX_SheetReader.yxmc and XLSX_FolderImport.yxmc as well as a couple of excel files to function. Without these missing components, it will be very difficult help you with the problem you're having. If you go to Options->Export Workflow, Alteryx will create a package that includes all theses dependencies. You can then attach the package. If the input excel files contain sensitive data, please create a sanitized sample version before including it in the package.
Dan
hi @Bwink88
The .xlsx file didn't get bundled in the package, but I think I have enough to fix the issues.
The first issue was that the Directory tool returns a directory path without any file name, so you can't use this to directly modify the path in the Output tool. The second was that the Action tool wasn't configured to modify the correct value.
The Action tool tried to update the line that is highlighted in the Value/Attributes window. In your workflow, you had the OutputData(3) attribute highlighted. You'd want File - Value instead if you had a complete path.
Here are the changes I made to get PowerTax Summary.xlsx written to the user specified directory.
Fairly straightforward. The only tricky parts are the New Action tool set to update the Output Path expression
And the changes to the Output tool
You'll have to perform steps 3,4 and 5 for each of your output tools.
Dan
Hi @danilang,
I was able to use your guidance to fix the issue, thank you so much! I had spent all Friday and early Saturday morning trying to figure it out. I did make several small tweaks:
1) I tried setting the Action as you had mentioned, but I kept getting parse error when it got to the Formula. I did the following:
a) In the Action configuration, I checked the box to Replace a specific string: and then took the quotations off from around C:/Test
b) I then added a \ after C:\Test in the Formula configuration. Since the action replaced C:\Test, it left the slash in so the output would save to the destination folder, otherwise when the process ran, it would save it to the parent folder under the name of the destination folder.
I have attached the final workflow. I am getting the following strange message:
Output 38 is set up exactly the same as the other outputs, with the exception being that it has it's own unique name of DepSchedule. When I open the output file though, it appears exactly as I would expect; it's like the workflow is trying to save the tab twice. Do you know why it would be doing this?
Hi @Bwink88,
The reason why you are getting the error is because you already execute the workflow successfully, the outputs were generated and now you are trying to run again the workflow but the outputs are there.
You have your outputs configured as 3. Output options: Create New Sheet
I recommend you change them to:Overwrite Sheet (Drop)
let me know if this works
Best,
Vianney