Hi UiPath experts,
My enquiry today is how can I split a consolidated report into individual reports with many criteria involved. I am able to do a simple loop to split the report in the past based on 1 or 2 criteria. However this time round, there are many criteria involved which I am stuck.
For reference, we can refer to my earlier topic here: (How to read ).
The steps required are listed below:
-
Open Main Report_D981A.xlsx (19.9 KB), go to Cases_2 tab in the workbook.
-
Copy Cell F2 from Cases_2 tab to “Appointment List” tab in Template v11.xlsx (1.2 MB).
-
Find the Company’s Name (e.g. Company 1) first, copy the name into Cell A7 of the “Appointment List” tab.
-
Copy the records under that Company (Column A to O, excluding the headers) until -Page Break-, paste into the “Appointment List” tab mentioned above (starting at A9).
-
Read the “Record Type” header (Column B) and “Target Amount” header (Column K) in the “Appointment List” tab. There will be 3 types of scenario:
a) If the record type is Appoint, to leave it in the “Appointment List” tab (i.e. Do nothing).
b) If the record type is Released/Urgent Released, to check if there is target amount. If there is no target amount, to cut and paste these rows to “Release (No Target) List” tab.
c) If there is target amount, to cut and paste these rows to “Release (With Target) List” tab. -
Arrange the S/No in all the 3 tabs so that the rows are in sequence.
-
Create a folder with today’s date, and save the updated template in the folder. The name of the template will be the Company’s Name.
-
Repeat step 2 - 7 (loop) so by the end of the script, if there are 11 companies in the Main Report, there should be 11 excel files in the folder with today’s date.
-
To create an exception: If the Company’s Name is “Company X”, to use Company X Template.xlsx (1.5 MB) instead of the original template. The steps from 2-7 remain the same.
I tried to come up with a new workflow based on my previous post and other related posts, but I can’t seem to link them up correctly. Hope that someone here will be able to provide some guidance on this.
Thank you in advance.