How to do this so file is picked

so i have an excel that read it saved in dt with 5 records
no what i want to do is i have a folder that has 5 files i want to pick one file add info from excel and then pick seconnd file add second row of data in that bit confused how to prceed

@manoj_verma1

Are the files you want to write are also excels?

If yes



dt - First datatble containing the 5 records
dt1 - Used for copying the rows and add to excel
Counter - to count the rows

cheers

cheers

@Anil_G dt is for excel sheet and then i have 5 text file where i will add data row 1 in file 1 then row 2 in text file 2

@manoj_verma1

Then do like below

for getting row as string searated by comma String.Join(",",dt.Rows(counter).ItemArray)

image


cheers

Hello @manoj_verma1

You can do as below.

1)Read Range to get the excel data to datatable
2)For each row in datatable activity
3)String.join(“,”,Row.itemArray) to convert each row to string
4)Write text file activity to write the content. In the write to filename, you can give i.ToString. (i should be declared as an integer with value 0)
5)Assign activity i=i+1

@Rahul_Unnikrishnan @Anil_G i have multiple column in excel
and also i have 5 text file in a folder that i need to update

row 1 in text file1
row2 in text file 2

@manoj_verma1

That is what I showed you in the screnshots please follow them

cheers

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