Don’t you want to output each individual Bank to a new sheet?
You need to loop through each Bank, then use that as your sheet name. And, filter the datatable by both the Bank and the Current Date. But, correct me, if I’m understanding this wrong.
Let’s say your data from the Read Range is dt1. You can take the unique Banks to loop through with an Assign activity.
banks = dt1.AsEnumerable.Select(Function(r) r("Bank").ToString ).Distinct.ToArray
Then, use that in a For each and filter by each bank and current date
For each bank in banks
Filter Data Table // column "Bank" = bank, column "Date" = Today
Write Range // bank as sheet, dt_out
Here is your workflow with those changes: Consolidation_Helper.xaml (11.3 KB)
When you output dt_out after the Filter Data Table, it should contain all columns that your original data you got from the Read Range, including the “Bank” column. You can also use the Output Column property in the Filter Data Table to only get certain columns.
If you have problem using the Date in the filter, the alternative way to filter is using .net inside an Assign activity like this:
dt_out = dt1.AsEnumerable.Where(Function(r) r("Bank").ToString=bank And Convert.ToDateTime(r("Date").ToString)=Today).CopyToDataTable
However, with the possiblity of there being no rows for today, you would want to store this to an array first to check the count.
dt_rows = dt1.AsEnumerable.Where(Function(r) r("Bank").ToString=bank And Convert.ToDateTime(r("Date").ToString)=Today).ToArray
dt_out = dt_rows.CopyToDataTable
Like I said, that is just an alternative to the Filter Data Table, which gives you more .net freedom.
Note: I didn’t look at your excel files and was basing these ideas on your original post and the .xaml you provided in your previous post.