Filtering datatable


I have been looking around but couldnt find an answer. I am having trouble filtering a datatable. I am writing to an excel sheet with 2 columns, first column I am writing a formula to that cell, second column is just string text. I was able to filter using the filter datatable when I didnt add the formula, after I added it, it wasn’t working anymore.

My main goal is to basically delete the rows from excel after each run.

Thank you!

Let me get this right.

You do put data in excel, and then you want to filter it (the data). is that right?

Hey Daniel,

Yes, so I write to the excel for error checking purposes. I thought filtering datatable will filter the excel as well to remove the rows but its not.

So I Just want to:

  • do certain activity
  • uipath stop due to error that I put in to check for, it outputs error in excel
  • I cehck excel and make updates if needed
  • rerun uipath, clears original data in excel
  • do certain activity again

Hope this clears it up more.


So you use an activity to write to excel and then you do check manually the excel file. Basically, it is for debugging purposes.

Well, don’t you think it would be easier for you to filter (check the Select in the link) the datable prior to writing it to excel ?

Hey Daniel,

so my workflow is basically comparing lets say pdf files(receive from different pple) to a column in sheet1 in the excel file which is manual input. the error check is another tab sheet2 and its to make sure the excel file took into consideration all the files, as depending on the naming of the file, it do different click base on sheet1.

So everytime I run, I can be going through different pdf files and its also cause I won’t be the only person running this so its easier for other user to see the error since they won’t be going into the workflow.

So I want an activity or a syntax where if the row is not empty then remove the rows but the header will still be kept. I’m also not too familiar with select, so I’m not sure if there is a way to delete the rows from excel not just the DT.

It is hard for me to understand the process.

However, my point is that rather than filtering the excel table in excel, it is easier to filter the DataTable in the UiPath and writing the contents in excel.

There is a specific activity to do that it is called FilterDataTable

Now, to be more precise, after you run the workflow, you open the excel file and try to filter the data, but the data does not filter, right?

I have tried using the filterdatatable tool and writing it back to excel. I also tried writing a blank datatable and writing it back to excel. But the data does not filter.

ok, open a separate process read some random table from the internet and try to filter it. If it does not work post the workflow and I will try to help.