Question on for each row to read all row in excel except first row

I have an excel to store data for processing. Te first row in my excel is the header of column. I would like to store every row in a separate excel and keep its column header.

How can I set the for each row not to read my first row but contain column header in each excel file?

@Emily_Yip
Hi.
Select AddHeaders

Thanks.
-Tera

@Emily_Yip

Do you mean want to write each row into different excel file from master file along with Column headers. I.e Each excel file should contain colummn headers and one row of data ?

Hi @Emily_Yip

Use Dt.rows.skip(1).CopyToDatatable and then use for each row in datatable
Use if condition
As row(“columnname”). ToString.contains("")
Use add data row

Thanks
Ashwin.S

Yes absolutely correct.
But I repeat the header in an excel . For example, if 3 row in excel, then it produces 4 excel because one of it contain 2 header row.

2 Likes

@Emily_Yip

Create one template excel file first.

Based on how many no. of rows are there that many times you copy template file and write data into it.