It’s possible to show a specific result into a specific cell on a table.
Similar like this:
I have a group by node
This is the result:
Then I will use another “Group by node” to sum this column
This is the result:
Then I want to show the result above in Excel Writer, inside de first “Group By” node, like this:
Let’s say that if I had did that in VBA, I know it’s possible.
What about Knime?
@Felipereis50 there is this node to change cells in an Excel sheet
Another option would be to use OpenPyxl
And for a 3rd option you can use this if you want to keep the excel file’s formatting in place. As long as you don’t select the option to “Remove all Data Before Writing” in the Advanced tab, any missing values coming over from KNIME will leave the existing excel data in place. You can also select a starting row or column for your write, so you can narrow in on a specific cell that way if you filter down to 1 column and row before you write.
I’ll study the flow you went through.
But since I don’t know much Python, maybe I can’t understand everything.
in KNIME you could also just use a joiner on the Row ID for your original table and your grouped table to get it next to the value in row 0
Hi @Felipereis50 ,
Here is a further option if you are using KNIME 4.7
I have a component on the hub:
It can write either a literal or an Excel formula directly into a cell reference on an existing spreadsheet. The cell reference and any formula can be entered in the form of a literal, e.g. E2 or it can interpret values of flow variables, to make it easier where you want to write to a location that changes because of dynamic data sizes
or you could just write the value of a flow variable instead of a formula:
Flow variable references take the same format as you’d find in the String Manipulation node, and if they are in square brackets, you can also include basic arithmetic to allow you to include simple offsets e.g.
Would take the value in the Number Rows integer flow variable and add 3 to it , so if it contained the value 7, this would refer to cell E10.
A simple demonstration based on your post is here:
A more complex demonstration is here:
That’s exactly what I want.
Amazing job that you did.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.