How to remove column row (csv file)

Hi Team,

I am trying to remove 1st column row , not able to find any dynamic solution for that .
(extracting data from web)

Need to remove above yellow column row

thanks

1 Like

Try with this

Have a view on this similar issue been resolved

Cheers @pankajdhane

Hi @pankajdhane,

You want to delete the highlighted row?

yes my columns start from row 2

While reading it you can read it from A2 by giving it in the range. @pankajdhane

Or you can delete the first row using remove data row activity.

Hi @pankajdhane ,

You can either start the range from A2 in the Read Range Activity, or you can remove it using this →

Dt.Rows.Cast(Of DataRow).Skip(1).CopyToDataTable()

Kind Regards,
Ashwin A.K

actually I am extracting the data from web and writing in csv… i want to remove before write activity

1 Like

Hi @pankajdhane ,

If that the case, then you can uncheck Add Headers.

Kind Regards,
Ashwin A.K

can we do it in data scraping ?

Okay cool you can simply use below activity.

image

or you can use below linq query as suggested by @ashwin.ashok
Dt.Rows.Cast(Of DataRow).Skip(1).CopyToDataTable()

I will try this…

I will prefer you to do it after data is being scraped. @pankajdhane

Fine in that case hope the below steps would help you resolve this issue

  1. use a read csv file activity and pass the filepath of csv file as input and get the output as datatable named dt
    Mention the delimiter as per your csv file
    Disable Has Header property

  2. Then use a remove Datarow activity and pass dt as input and mention the rowindex you want to delete

Cheers @pankajdhane

thanks @Palaniyappan will try this solution

1 Like