Filter the datatable and write in second sheet

Hi everyone,
I need help on the filter datatable,
I want to write the range in the second sheet after doing the filter. I use the filter data table activity and it is working fine in sheet 1 but it is not writing in sheet 2.
Can someone help me to solve this
This is my excel file
SampleData.xlsx (16.4 KB)
And this is my workflow
Filter.xaml (8.8 KB)


Hi @Sharmilah_Devi

I went through your solution. The reason for it to not write back the filtered results is because of following reasons.

  1. Though you add the table filter for region and item, in your read range activity, it reads out all the records irrespective of the filter you have applied.
  2. The datatable is then only filtered for the unit cost. So, actually, only this filter is applied by the time you write the data back to excel

You really don’t need to have those two filter activities to filter the data in excel. Having those two activities is fine if you are doing everything in excel itself rather than extracting the data into datatable variables. You can actually use the Filter Data Table activity to apply all three filters at once. And then use that datatable to write the results back to the filter sheet.

I have changed it to the solution described… It works fine now!!

Filter.xaml (9.4 KB)
SampleData.xlsx (17.8 KB)

If this works for you, please make sure to mark my answer as the solution too :slight_smile:

1 Like

Thank you so much it works fine now. can I have one more question here please?
I want to count the total sum of one column and write in a cell. and send via email.
What activity should i use to count the sum and write it in a cell.

HI @Sharmilah_Devi

Glad to hear it worked out for you :slight_smile:

For the sum, you can refer to the below post.

hi thanks for share the format but it didn’t work on mine.
Filter.xaml (10.2 KB)

Check this out…

Filter.xaml (10.3 KB)

hey there, its working fine but can i know why you are using .Rows.Count + 1 ?
And this is over write on my last row in the column. How if i want it to write at the last row of the column which in a blank data but in the same column


Hey sorry. It should be + actually. Then it will write on the cell you want :slight_smile:

Im using rows.count to find how many rows are available in your filtered list. So that helps me determine on which row i should mention the total sum.

Oh okay thank you so much for your help

1 Like

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