Hi,
I have an Alteryx workflow which produces a rendered output - this could have varying numbers of columns, depending on the user's uploaded dataset.
To ensure all columns are included in the output, I've set the rendered page size to a large number. However, the column widths are very large as a result - until the user selects all columns and resizes them. I've attached an example file.
Is there a way to get Alteryx to automatically resize the columns or to automatically run an Excel macro on a rendered output to autofit columns?
Thanks
@ALT_2358 I was searching for this solution myself. With the help of ChatGPT I built a pretty nice solution.
I thought about using the run command in alteryx, it could launch a script and this script could open the excel file and do all the resizing using VBS (I suppose that's a better solution that Python as it's Microsoft Native) hence why I needed chatGPT for the script assistance 😂..
Premise of the solution
I'm attaching an example on a dummy workflow in Alteryx with this method. See what you think. Also, if you don't like command prompt popping up whilst the file is doing it's thing, you can just select the checkbox on the run command for it to be silent/minimised
This is also iterates through all the tabs on a file by the way. Pretty cool stuff.
Last thing to mention that I found:
It really helps by making the output really wide, then when we autofit with this method, it gets it to the perfect stretch
Might be worth a blog post for this one! Let me know if it works @ALT_2358
All the best,
BS
I have a Powershell script I can dig up if you're interested. The script includes all of the Excel formatting listed in this Idea:
Enhance options for Excel output
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Ideas/Enhance-options-for-Excel-output/idi...
The Idea itself could use a few more Likes.
Chris