Output Password Protected XLSX macro with dynamically changing name (today's date)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone,
As a new user who found no password protection/encryption for outputs a little disappointing, I was quite pleased to find this macro by Ben Moss that can apply a password to your xlsx output.
Question for you, how would I deal with a file name that changes based on today's date?
I output an xlsx file with today's date in the name. For example, my current file name defined in the macro question is "test", but I need it to match what is dynamically generated by the output tool in the previous step, for example "test - 2020-11-20" today.
How can I feed that dynamically changing name into the macro?
See example workflow.
Thank you
Solved! Go to Solution.
- Labels:
- Dynamic Processing
- Gallery
- Macros
- Output
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I recommend when you upload the workflow that contain any macros, you might export "yxzp" file by "Export Workflow" and upload it. Because the when anyone download it, he don't have the macro, then the macro is missing(please refer the below image).
Fortunately I have the Output Password Protected XSLX macro.
Back to the original story.
You have to use Batch Macro that overwrite the filename dynamically.
Workflow:
BatchMacro:
The Action tool connected Parameter control overwrites "FilePath".
Please refer attached workflow.
Please reply to me if you have any questions.
My Alteryx designer version is 2020.4, so I overwrite version info of the workflow into 2019.3.
If attached workflow is not work, please tell me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AkimasaKajitani,
Thank you very much. I got it to work.
As you can see I have a fair bit to learn, so I appreciate your tips and teaching me a bit more about macros. I must admit, that is the part of Alteryx I know the least of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm glad it worked out well.
You may use Interactive lesson about Macro to more learn it.
https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AkimasaKajitani, I am getting the below error message when I tried to use your workflow for custom file name. Original file and macro from Ben Moss has no issue. Please help.
Working directory is c:\temp and I downloaded all files to that folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AlexAung
Can you share the macro setting?
I doubt that the setting "File Name" of macro is wrong from this result "C:\temp\C:\temp\"
FileName field should be set "Subject" field made at the previous formula tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, able to attach the packaged macro as it has broke and the macro cannot be found from the link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello
I am trying to protect entire sheet instead of just one tab, when I use this macro it runs however "It is protecting and outputting only one sheet which I mentioned in macro configuration. How do I protect entire sheet ? or only specific sheets but still have all the tabs in the output file ?
Thank you in advance!
