How to delete excel rows using logics

Do you want to remove the row or column? If you want to remove a row, use Filter Data Table and add the condition “ColumnName” = “Value”.

Where,
ColumnName should be the actual header name of that particular column.
Value should be the comparison value. Ex: In your case, it is TodatDate (Quoting the variable you’ve used)

1 Like

Hi @Abubakkar - You can use Insert/Delete columns activity which is available in UiPath under Excel .

Insert_DeleteColumns

Thanks,
AK

1 Like

Thanks @SathishCodes

yes, but it’s not performing

image
for your references

image

Hi,

If you want to remove columns,from filter wizard you should select output columns and click remove option and give the column name you want to eleminate.You can multiple columns by using +.

Hope this help!

1 Like

Hi @Abubakkar

Do One thing why dont you use

Invoke Method
and use Dt.Columns Target type and target is RemoveAt

Thanks
Ashwin S

1 Like

Thanks @AshwinS2

could you help me plz what should I change ?

Thanks @gulab


image

Please attach you xaml file here.

1 Like

Main.xaml (39.4 KB)
please find the attached xaml

countexcel2.xlsx (12.0 KB)
excel input file

if today’s date (12) and excel column name date (12) is same then i should delete columns with today from end of the month till.

Hi @Abubakkar

Set Target type as null and set target object as Case1.Columns(“Column Name”)
and Method Name is RemoveAt

Thanks
Ashwin S

1 Like

should i mention this Case1.Columns(“col_index”)

Hi @Abubakkar

Check this

Thanks
Ashwin S

2 Likes

Hi @Abubakkar - Please see the attached workflow file, this gets the date and deletes the column of that particular date.

Main (3).xaml (9.2 KB)

Thanks,
AK

1 Like

Thanks @AnandKumar26

But, it’s deleting only today date column only …
i want to delete today from end of the month till
is it possible?


what should i mension here?

Hi @Abubakkar - It requires simple logic. That can be done. Not an issue. Will finish it and share it with you.

Thanks,
AK

1 Like

Main (3).xaml (13.5 KB)

Hi @Abubakkar - Please see the attached workflow.

Thanks,
AK

1 Like

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