Hi @aksyracuse , and welcome to the KNIME community,
To summarise my understanding, you have a table containing supervisor and associate data, with multiple rows and each row contains a supervisor along with information about one of their associates. There may be multiple rows per supervisor.
You wish to populate an Excel spreadsheet with the data contained within the table, but with the rows for each supervisor appearing in its own tab.
I hope that is a basic summary of your problem.
To write to a specific tab on an Excel sheet in this way, you will need to ensure that all of the rows for a given supervisor have been grouped together, and then these will be written to the spreadsheet as one table.
A typical way to do this would be to use the Group Loop start node, with the supervisor chosen as the “grouping” column (in the “Include” section on the Group Loop Start node’s config).
In this way, on each iteration of the loop, the rows for a single supervisor will be grouped together and then these can be passed to the Excel Writer. The Excel Writer must be configured to “append”
and on the Flow Variables tab, set the “Sheet name” to use the “supervisor” variable (or whatever the name of the flow variable is that the Group Loop will have created from your “supervisor” column)
Terminate the loop with a Variable Loop end, so it looks like this:
One thing though, if you rerun it and a supervisor is no longer present, this won’t overwrite the excel tab that was previously created for that supervisor. I don’t know if you need it to. This could be handled, by attempting to delete the xlsx file prior to the loop start, or maybe by using a flow variable based on the iteration to control the “overwrite” or “append” setting in the Excel Writer. If you need further assistance with that or anything else isn’t clear, then please ask.
Group Loop and Write Excel Sheet.knwf (15.3 KB)