I have csv data but i want to delete colomn1, colomn2.... in header file

image

Hi @Garyy

Use Read CSV activity and create a variable for Datatable
Now use filter datatable activity and click on configure Filter-> Select OutputColumns and select remove and write the “Column1” and “Column2” and use write csv with the output datatable

Hope this may help you

Thanks,
Srini

but some time in csv multiple colomn then how can do it

@Garyy

Okay, for this case you can declare a array variable of columns let’s say arrColumns
Now assign activity arrColumns = {“Column1”, “Column2”}
Then For Each arrColumns-> Inside that place remove Data columns and put your datatable
So after end of the for each you can write you logic to write the results

Thanks,
Srini

but i dont want to put hardcode {“Column1”, “Column2”

@Garyy

So, how bot will know which columns to delete?
Can you tell me how you will give input to the bot saying which columns need to delete?

Thanks,
Srini

contains only coloum word

@Garyy

Yes, its doable

Use for each activity and write as datatable.Columns
Now inside the For each you can use IF and write currentitem.Tostring.Contains(“You value”)
Then-> place the remove Data column activity and give the currentItem.Tostring and Column Name and the datatable which you need to remove

Hope this may help you

Thanks,
Srini