Hello,
I am trying to dynamically rename one file while multiple sheets while preserving the formatting of the workbook. I tried changing the entire file path in the output tool using a column created to dynamically change the file name, but receive an error stating I need to specify a sheet name. Attached is my workflow.
Hey @JustinB12, as you're replacing the whole filepath from the custom path you're making in the formula, you'll need to define the sheet and range there so it's still present when you replace the output path:
You also hadn't configured the bottom output tool like your first so just ensure you do so as below:
Thank you for the response.
With that change, I am now able to have the sheets identified and the file changes. One issue I am running into now is that when the filename changes to lets say '06 2022', the formatting that was previously in '05 2022' is now lost.
Is there a way to still preserve the formatting even with the name change in the file?
Do you definitely still have preserve formatting ticked for both output tools?
@JustinB12 I think what is likely happening is that, because you’re changing the filepath before output and obviously the month has changed, you’re not actually overwriting at that point but creating a new file because the name is different. The immediate way of getting around this that I can think of is building the table in Alteryx and then outputting it as a .xlsx from the render tool, though I’m not sure if the formatting you’re applying is beyond their capabilities.
@JustinB12 - This is possible (maybe not in the most straightforward way).
One way of keeping the same output formatting and renaming the file is by using the blob output tool. Blob output will create a a copy of the original file and will dynamically rename the file.
Try the attached workflow by configuring the input (output file of your previous workflow) and a new output file.
In blob input choose the setting "Modify file name by: Appending Field To File Name"
I recommend not running this workflow manually and instead chaining this workflow to your original workflow (i.e. run this automatically after the first one finishes), to create your final output file.