Hi,
I have created a workflow to overwrite a range of cell in excel, now i want to save that output file by renaming (file name not sheet name) it without loosing excel formatting. How can i do this?
Solved! Go to Solution.
You can use Blob tools to take a copy of the created file and past it to a new name.
It will keep formatting:
Hope this helps,
Regards
Hey @Kanika29
If I'm following what you're asking for correctly, you want to write out a sheet of new data that has a format matching an existing sheet.
Yes?
If that's the case: The cool thing about Excel files is they aren't some unique, specific file which can only be read one way.
They're a cleverly disguised zip file.
Seriously, try changing the file extension of .xlsx to .zip and open it up.
There's a wide array of contents they could have but at the very least you'll find a few xml files. These are the independent properties of the "Excel file". There may be others depending on what your Excel contains (images, merged cell references, etc).
How is this relevant to keeping your formatting while changing the data?
You can "simply" remove the stylesheets that define the cell level format from within one Excel file and place it in another.
If you want to get fancy and complex you can also update the stylesheet programmatically, but you're going to have to do a bit of research before going that far.
(see open office standards docs openoffice.org/xml/general.html )
But what if you don't want to manually change the file path (or use 7zip) to transfer between archives/xlsx?
You can write some command like arguments to run in Alteryx that will do this for you.
I've attached a starter workflow with macros and sample Excel files that should be helpful to your quest.
thanks patrick
Hey @Kanika29 let us know if this answered your question by accepting as a solution. This helps everyone looking for similar solutions on the community.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |