I am facing difficulties during the use of Datatables. I have got a huge excel table with more than 80000 rows. I have to remove specific rows from that Excel. Every row which contains the word 2022 1Q and 2022 2Q and 2022 3Q and 2022 4Q should be removed from the Excel. I am first reading the range. Delete all rows in the Excel and afterwards tried to paste the filtered Data, so the datatable without the rows with the mentioned words again in the Excel. I already tried the for each row in datatabke activity in combination with the Remove data row activity, but this takes quite too long. I stopped the run after 10 minutes of loading.
Is there another possibilty maybe with assign acitivity and the Remove data row activity?
Edit:
-Your Input DataTable and Output DataTable can be the same so you just overwrite it.
-you can chain Operations with and/or so one condition or all conditions have to be met
I am just wondering is this kind of reliable solution one would choose for such a process scope or is this with VB expression in assigning variables more reliable?
Sorry for this question, but I want to make sure to choose a reliable option.
@MaryspaceX, both work, you can use variables in the Filter Table Activity too, either way is fine.
If you have other people working with the project as well, who don´t understand long expressions then I personally would prefer activities since these are easier to understand.
For some reason this is not working. Could it be that I have to include the column name in the VB expression?
I tried this, but this is also not working:
Dt1.AsEnumerable().Where(Function(row) row(“Fiscal Year”) Not “2022 1Q,2022 2Q,2022 3Q,2022 4Q”.Contains(s(0).ToString)).CopyToDataTable
How can I replace “2022 1Q,2022 2Q,2022 3Q,2022 4Q” with variables e.g fiscal Year is a Varibale assigned before in the process: fiscalYear + " " + “1Q”, fiscalYear + " "+ “2Q”?