# \[QUERY\] FilterDataTable Activity

**URL:** <https://forum.uipath.com/t/query-filterdatatable-activity/76364>\
**Category:** Help\
**Tags:** system, activities\
**Created:** [November 15, 2018, 8:51am UTC](https://forum.uipath.com/t/query-filterdatatable-activity/76364 "2018-11-15T08:51:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Afiyah](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@Afiyah](https://forum.uipath.com/u/Afiyah)\
**Post date:** [November 15, 2018, 8:51am UTC](https://forum.uipath.com/t/query-filterdatatable-activity/76364/1 "2018-11-15T08:51:18Z")

</div>

Hello,

I have extracted a datatable and from that datatable i need to filterout some specific rows of data and then append it to an excel/workbook.  
Please could someone explain me how can i make use of filterdata so as to implement the above process successfully…

Thankyou,

---

<div class="post-metadata">

**Author:** ![UiJules](https://avatars.discourse-cdn.com/v4/letter/u/3e96dc/32.png) [@UiJules](https://forum.uipath.com/u/UiJules)\
**Post date:** [November 15, 2018, 8:56am UTC](https://forum.uipath.com/t/query-filterdatatable-activity/76364/2 "2018-11-15T08:56:34Z")

</div>

Hi Afiyah,

Please check my solution I suggested below, perhaps it can help:

> [@Filtering Excel and writing the output to a different Excel file](https://forum.uipath.com/t/filtering-excel-and-writing-the-output-to-a-different-excel-file/76198/4):
>
> I would solve this by using two datatables in the following method: 1 read range of the first Excel file (DT\_Unfiltered) 2 assign DT\_Filtered = DT\_Unfiltered.Select(“[Column1] = ‘Criteria1’”).CopyToDatatable 3 write range to the second Excel (DT\_Filtered) Find attached an example workflow [Filter\_Excel.xaml](https://global.discourse-cdn.com/uipath/original/3X/d/1/d109704806c5a5ef6949ddbd0ea2ae65d2ce7f7d.xaml) (8.5 KB)

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [November 15, 2018, 9:15am UTC](https://forum.uipath.com/t/query-filterdatatable-activity/76364/3 "2018-11-15T09:15:50Z")

</div>

HI @Afiyah,

Refer below post

> [@DataTable filtering with expressions](https://forum.uipath.com/t/datatable/21692):
>
> Hi All, Use below code to remove empty row from the table. DataTable name-\>DataTableName Use assign activity DataTableName=DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(""))).CopyToDataTable() Re-usable Component pass Parameter as datatable you will get the answer. [RemoveEmptyRows.xaml](https://global.discourse-cdn.com/uipath/original/2X/1/18c0883a487d21d4e0c1031cfa692253af6718cf.xaml) (8.5 KB) Remove rows based on particular column is empty. DataTableName.Select("Convert(column3, System.String)\< \>''"…

Regards,  
Arivu

---

<div class="post-metadata">

**Author:** ![Mayur\_N](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mayur_n/32/512727_2.png) [@Mayur\_N](https://forum.uipath.com/u/Mayur_N)\
**Post date:** [December 21, 2023, 3:14pm UTC](https://forum.uipath.com/t/query-filterdatatable-activity/76364/4 "2023-12-21T15:14:30Z")

</div>

What if i have multiple keywords to be filtered out from a single column?
