# Excel Filter - Update in same Sheet

**URL:** <https://forum.uipath.com/t/excel-filter-update-in-same-sheet/249449>\
**Category:** Academy Feedback\
**Tags:** activities, excel\
**Created:** [September 2, 2020, 6:47am UTC](https://forum.uipath.com/t/excel-filter-update-in-same-sheet/249449 "2020-09-02T06:47:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deeipauk](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/deeipauk/32/263296_2.png) [@Deeipauk](https://forum.uipath.com/u/Deeipauk)\
**Post date:** [September 2, 2020, 6:47am UTC](https://forum.uipath.com/t/excel-filter-update-in-same-sheet/249449/1 "2020-09-02T06:47:02Z")

</div>

Hi Team,

I need to remove 1 month old data from the excel sheet and need to place in the same sheet.

My Input and Output will look like this

 ![image](https://global.discourse-cdn.com/uipath/original/3X/a/3/a384c485dbbe241872dfff5a77bbb9dcfc9752f5.png)

 ![image](https://global.discourse-cdn.com/uipath/original/3X/1/4/14b8e2ae1460f0a1494bb3bf0e7ba0be1abee7b6.png)

Please note following concerns I have  
1.) I cannot delete and re-create same file due to business needs  
2.) I cannot use “Excel Application Scope”, I can only use Work Book activities, since sometimes excel app scope is throwing error(HRESULT: 0x800AC472) and from the management they have decided not to use this across my organisation

 ![image](https://global.discourse-cdn.com/uipath/original/3X/0/3/036838c24182620a7c1d7d884b63bebb4434d958.png)

I have the filtered DT with me, no problem in filtering, the issue for me is to update back in the same sheet

If you can give me idea how to clear excel sheet before I use Write Range that will be sufficient. Please suggest

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [September 2, 2020, 7:26am UTC](https://forum.uipath.com/t/excel-filter-update-in-same-sheet/249449/2 "2020-09-02T07:26:14Z")

</div>

@Deeipauk

Write Range is sufficient for you in this case

For reference you can see the below post

> [@Tutorial : Convert Number to Date Format](https://forum.uipath.com/t/tutorial-convert-number-to-string/249171):
>
> [[Convert Number to Date Format || UiPath || RPA UseCase] ](https://www.youtube.com/watch?v=200LL34AckY) Thanks

Mark as solution if this helps

Thanks

---

<div class="post-metadata">

**Author:** ![Deeipauk](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/deeipauk/32/263296_2.png) [@Deeipauk](https://forum.uipath.com/u/Deeipauk)\
**Post date:** [September 2, 2020, 9:16am UTC](https://forum.uipath.com/t/excel-filter-update-in-same-sheet/249449/3 "2020-09-02T09:16:20Z")

</div>

Write range will overwrite the data, if sheet has 5 data after filter I have 3 data, then last 2 rows will remain same, finally wrong data will be there in the sheet

Thnks for your reply

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [September 2, 2020, 9:26am UTC](https://forum.uipath.com/t/excel-filter-update-in-same-sheet/249449/4 "2020-09-02T09:26:39Z")

</div>

@Deeipauk

Hope this may helps you

 ![image](https://global.discourse-cdn.com/uipath/original/3X/5/4/54b15cf0c8288ae460987e246ece5296683401df.png)

1. Read Range - Dt1
2. BuildDatatable - Dt2 with empty data
3. Write Range - Use Dt2 so that it will remove the data
4. Filter Datatable - Dt1
5. Write Range - Use Dt1, so you will get the filtered Data only

Mark as solution if this may helps you

Thanks
