Hello,
Could you tell me how I can write the data from this table in each sheet, but in the same excel file, depending on the key in the column: account-code-key.
as shown in the photo.
thanks in advance
Hi,
You can use a Group Loop Start node to go through your table in chunks determined by the account-code-key column. Then in each iteration, you can write your data using the Excel Writer, always choosing the same file and selecting append mode for the “If exists” option. For the sheet name, however, you can use a flow variable that the Group Loop Start node creates. For that, go to the flow variables tab in the Excel Writer’s configuration and then under “sheet_names” choose “account-code-key”. Then add a Variable Loop End node to finish the loop. You can connect the top right corner of the Excel Writer (red dot) with its input.
Kind regards,
Alexander
Thank you for your reply,
At the beginning, it writes all the data in each sheet, that’s why I added a condition (node Rule-based Row Filter), like in the photo.
the problem now is that I have duplicate data in each sheet as pictured, any ideas?
Thanks in advance
Hi,
You need to use the Group Loop Start node, not the Table Row to Variable Loop Start. Then you also do not need the Row Splitter.
Kind regards,
Alexander
Hi @mosmel , in addition to the above, although you want to write the file with “append”, as @AlexanderFillbrunn mentioned earlier, you will want to ensure that on writing the sheet, it “overwrites”. Otherwise if you rerun it you will also potentially get duplication.
So you are appending the file, but you are overwriting the sheet. I hope that makes sense
… Unless of course, when you run it subsequently you actually do want to append new information, in which case you would tell it to append to the sheet too. It depends on your use case.
it works, thank you very much
yes I understood your reasoning, that’s why I will create a folder for each execution.
Thank you very much
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.