duplicate sheet appender

duplicate_cust_orders.xlsx (12.0 KB)

Hello everyone,
I’ve come to call on you because I can’t find my solution.
I have an excel file sheet “current situation”(attached) with a list of orders by customer.
For each recurring customer number, I need to separate them and put them in new sheets ‘to_be 1’ ‘to_be 2’. etc, etc.

I’ve done this but my problem is that I don’t always have the same number of orders per customer so I have to add or delete nodes accordingly

Can you help me?
Thank you so much

1 Like

Hi @Barba

Tnx for providing some sample data :slight_smile: . Here is minimal wf that shows how you can write a sheet for every customer duplicate_sheet_appender.knwf (21.5 KB)
afbeelding

The Excel Writer uses the flow variables created by the Group Loop to create the sheet-names.

afbeelding

Be sure you configere the write option to append.
afbeelding

gr Hans

1 Like

Hello Hans,

thank you very much for your help. Unfortunately it’s not quite what I need. I need to have the first order from customer A, the first order from customer B and the first order from customer C on sheet 1. On sheet 2, the second order from customer A, the second order from customer B, the second order from customer C, etc etc.

regards

1 Like

Hi @Barba

Aha, I understand. Well the logic remains more or less the same. By adding a Rank node, I ranked the orders within Customer. And use the ranking as the Group and sheetname (instead of customer). duplicate_sheet_appender.knwf (26.9 KB)

gr. Hans

1 Like

Hi Hans,

Thank you so much, it was so easy :slight_smile:

BR

2 Likes

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