Any way to add multiple tabs from a single Excel Writer?

Hi @Bleck , on the excel writer node you can add additional sheets (tabs). In the Classic UI click on the “…” on the node.

image

image

In the modern UI there is a small + on the bottom left of the node when you move the mouse over it

image

image

image

Once added you can then configure the sheet names in the node config.

Then send your data for different “tabs” to the respective port.

The only thing with this approach is that you do need to know in advance how many sheets you need, and if this changes over time, this doesn’t really work.

The alternative would be to place the writer into a variable loop, and define a flow variable in the loop with the name of the required sheet, e.g.

In this trivial example, a sheet name column is added by a String Manipulation. You could have other (more complex?) logic to define the sheet name.

Then I am grouping the rows by sheet_name and so in each iteration, the sheet_name for the current group of rows can be written to a flow variable, and then in the Excel Writer, the config could be set to something like this:

There is no need to configure anything in the variable loop end in this example.

3 Likes