Hi Friends. I am looking for some help to resolve this interface design question. The ask is to allow user to input multiple sheet names, so the macro can read all sheets and generate its output.
The macro can read password files with multiple sheets, however I couldn't figure out a neat way to allow users to input multiple sheet names.
Of course using a text input tool we can create a column field say "SheetNames" then input Sheet1, Sheet2, Sheet3, etc. But is it possible to do the same using the macro interface? The look & feel is much better using macro input.
I attached the file for reference. I appreciate your help !
I don't think you can dynamically add new interface tools to accommodate for x sheets (where x could be any number).
I see two sub-optimal options,
1. You add three (or however many you're prepared add) sheet interface tools and ignore those that are empty (or add a checkbox where they should apply)
2. You could prompt the user to add a comma separated list of sheets and then iterate in Python Tool.
Maybe a multiline Text Box could work too.
Thank you. Sir. High-level the Python tool read and store the user input list of values into a variable, and then a pandas data frame. For this sheet name field, I wrote a loop to read all sheets in the file, so the scripts can pick up all sheet names and output the results in each tab.
The primarily reason for me to design this macro is because the company has security reasons to block using external macros and many other tools are not available as well. And the regular input tools won't read the password protected files (some confidential data stored in the files and need to be protected all the time)
I thought about using multi-lines and didn't work in my first try. I will give this another shot. Many thanks !
Actually, if I use a text input tool for "SheetName" column and link that to the Python tool, it did read all the sheets. The inconvenience is that the macro need to be customized based on how it was being used. Not 100% dynamic but still a good solution.
I was hoping for something more innovative than my solution. 😁