Hello Knime community
I have developed a knime workflow which among other things it reads an excel workbook which has a macro that it would be incredible if Knime could run that macro and then continue with the flow . I was told that “External Tool node” may work however i do not know how to configure it. Does anyone know if this is possible and if it is, how it would be configured?
thanks and regards
I don’t thin that it does exist a node that can execute macros inside of an excel file.
Ina brainstorm mood and aiming to help with your challenge … You can execute the ‘excel_file.xlsm’ with the help of ‘Execute Shell Script’ node, from AF Utility Nodes’ extension. This node will retain the workflow progress until the task ends up (the excel file is closed / the excel app is quit)
The rest of the work would had to be implemented in the excel file itself:
I hope these ideas can help you to fix the workflow.
Your solution sounds just exactly what I need.
I will try to make it work.
I will tell you
I appreciate your help
Hi @Soldado , when I read your post I was thinking along similar lines to @gonhaddock’s brainstorming suggestion.
Sometimes a problem doesn’t have an immediately obvious KNIME solution and so you need to see if a solution is achievable outside of KNIME, and then see if any of those solutions can be made to work with KNIME.
I’m finding chatGPT to be a great tool for such brainstorming these days.
Hopefully the following shared chat is visible to you. You can see I ask the simple question of whether an Excel macro can be executed from outside of Excel, since that in simple terms is what you are asking.
It immediately returned two ideas (out of three proposals, the third of which I treated as not so useful) that on the face of it can be made to work with KNIME, or certainly worthy of further investigation.
The first is the possibility of using Python and the second is using the excel Command Line Interface that features in @gonhaddock 's ideas.
Here is the chat:
Assuming the above shared chat works, you can see I ask it for an example using python.
Once we have a Python example, there is a reasonable chance that the solution could be integrated into KNIME. (Assuming you know a little python of course).
From experience I wouldn’t rely on chatGPT code to do exactly what you want without testing and debugging / refinement but it’s a great “step up” to get initial ideas, and to help prototype. I hope that helps.
And if it can be done in Python, but you are more conversant with Java… Well, why not continue the chat with “what about using Java?” And see what the response is , because then working it into a Java snippet may be an option for you…