Row by Row iteration


#1

I want to iterate by row wise which means in a excel which contains many row in that i want iterate row by row and want to print a single row in different excel…please help me how to do


#2

@ibunumasuth if u want to write row based on value of certain data. Use following methods.

  1. Read the excel and store the output in dataTable variable.

  2. Use below to get method required rows based on value.

    DataTableName.Select("[ColumnName]='value'").CopyToDataTable
    

    Output of above method will be dataTable, assign output to datatable

  3. Write above output obtained datatable to required excel using read range activity.


#3

sorry i am new to this if you have example plzzz share so that everyone can learn from u…Thanks


#4

@ibunumasuth whats ur exact requirement? u want to copy excel data from one excel to another excel or u want to copy data based any condition


#5

See Attached workflow which will read an sample having excel Name,Address and Phone and the for each row it will create new excel

Main.xaml (13.9 KB)

SampleExcel.xlsx (8.2 KB)
Result_1.xlsx (8.1 KB)
Result_2.xlsx (8.0 KB)


#6

Try making a for-each loop and in the loop use Get Row for the first excel sheet’s variables, and then in that same For-each Loop use excel application scope to specify the other sheet, and with a write range activity inside to print the original values from the original sheet


#7

Yes, Exactly ur write bro…but i should not use get row item in it…only i should with the help of for each only…


#8

Well i am having excel sheet in that i am having NON-LONEE in that there will be lot of information of the customer for each customer i have print the each excel for each customer with the header also…


#9

in NON_LONEE in that colum there will be also lot of information will also be there in that single row for example

FarmerType Name Faremer Community Age
NON-LONEE ABCD OBC 12
NON-LONEE ABCD ADC 20

#10

in this i want to iterate row by row including header also


#11

You can do it the same way. Try a if condition in for each look like row(“FarmerType”).tostring= NON=LONEE then write into excel with Add Headers property checked


#12

Let me try it…Thanks Bro