Write multiple sheets into a single excel file and then connect a download widget

How can i write multiple sheets into a single excel file? I have used the deprecated excel sheet appender and it works but how do i connect it to my file download widget later on as it doesn’t support the appender and only the excel writer?

Hi @r_jain,

I assume you’re trying to add multiple sheets to a new Excel file that you would then like to be able to download.

If this is your fact pattern, there are two approaches that might work.

If you know in advance how many sheets you’ll want to add to the Excel file, you can add additional data inputs to a single Excel Writer node by clicking the ellipses in the bottom left of the node, selecting Add ports, and then Sheet Input Ports. You can then configure the node to append the data as multiple sheets.

If the number of sheets is variable, you can put a single Excel Writer node inside a loop. Inside the loop, you can create a variable for the sheet name by concatenating “Sheet_” and the loop iteration, which is available as a variable. Then configure the Excel Writer node to append the data with the new sheet name variable controlling the Excel Writer node’s sheet_names variable configuration.

Regardless the approach you use, you’ll probably want to write both the Excel files into a temp folder. You can then point the File Download Widget to the temp folder.

For your reference, I’ve included a screenshot to illustrate at a high level both approaches below.

3 Likes

Hi @r_jain You can donwload it via request node and then use Binary Object to files node. If you know in advance how many sheets you’ll want to add to the Excel file, you can add additional data inputs to a single Excel Writer node by clicking the ellipses in the bottom left of the node, selecting Add ports, and then Sheet Input Ports. You can then configure the node to append the data as multiple sheets. You can check here complete

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.