May I know how to segregate this excel file depending on its branch using LinQ to make the execution faster where each Branch will be put on a separate sheet? Kindly see below for the desired outputs and attached file (Sample_Reports.xlsx)
Yes you can use the LINQ Expression, check the below steps,
→ Use the Read range workbook activity to read the Input excel and store in a datatable called dt_Input.
→ Then use the For each activity and give the below LINQ Expression in For each,
→ Open properties of For each and in the argument type dropdown select the System.Data.Datatable.
→ Inside for each insert the assign activity to get the name of the branch by using LINQ Expression,
- Assign -> SheetName = dt_Input.AsEnumerable.FirstOrDefault(Function(x) Not String.IsNullOrEmpty(x("Branch").ToString()))("Branch").ToString()
→ After assign activity insert the Write range workbook activity and give the path of the input excel file, SheetName variable in the Sheet name field and output of for each activity in datatable field.