Facing Issue feeding the match data into excel

@Palaniyappan But I am not extracting the Name and Phone number by using the Match Activity. Only I am using Match to extract the Email I’d. Here how I have done. Right me If I am wrong.

1 Like

hope you might have saved the output of data scrapping and get text to a variable
mention that variable here buddy
{datascrappingvariable.ToString,gettextvariable.ToString,item.ToString}
Cheers @balkishan

did the same way but it starting writing from the cell c5 and again n again it’s overwriting in cell c5 only.
image

1 Like

may i have a view on your xaml if possible
Cheers @balkishan

1 Like

No bro I didn’t mentioned the variable in the data column. I am using separate activity for this write range.

1 Like

@venkat4u I did Acc to your 4th point but when I give the but It ask me the cell content, I gave the datatable variable there getting the error.

1 Like

Hi I didn’t get the Item is 1 can you plz elaborate it more :slight_smile:

1 Like

in cell content value please pass Item variable.

1 Like

Fine
–place the build datatable before the foreach loop like this and create these columns in it


change the scope of the variable DT to whole sequence in the variable panel
–then inside the for each loop remove the assign activity with count + 1
–then here also remove the assign activity and in add data row mention like this
{ProfileName,PhoneNum,item.ToString}

–next to for each loop with add data row, remove all these activities

–atlast to the for each row loop and before close tab use write range workbook activity where mention the excel name, sheet name and datatable as DT the table we created in Build datatable activity
Cheers @balkishan

Fine lets do thing let all the value gets entered in the excel, remove all these condition, assign activity with in_profilename, in_phonenum and in_item everything…and just keep the add data row as we did earlier…that adds the value to the excel with duplicate rows where same name have two mailid
Now
–atlast before using write range workbook activity that writes the data to the excel, use a for each row loop and pass the DT variable as input to it
–inside the for each row loop use a if condition like this
row(0).ToString.Equals(DT.Rows(DT.Rows.IndexOf(row)+1)(0).ToString)
this means the first row of name is equal to its next row of name which implies that two rows have same name, and if this condition gets passed it will go to the THEN part of if condition where we can mention like this
row(1) = row(1).ToString+","+DT.Rows(DT.Rows.IndexOf(row)+1)(1).ToString
row(2) = row(2).ToString+","+DT.Rows(DT.Rows.IndexOf(row)+1)(2).ToString
and next to these two assign activity use a add to collection activity to make a note on the row index number in order to remove after this concatenation
–for that in the variable panel create a variable named rowindex_list of type list(integer) and mention the default value as new list(of integer) and now use a add to collection activity next to the above two assign activity and mention the collection as rowindex_list and in item mention as DT.Rows.IndexOf(row)+1
– so this will iterate till end we will get the value of concatenated phone number and mail id in the datatable, but still we need to remove the duplicate rows right
–so for that next to this for each row loop use a for each loop and pass the input as rowindex_list and change the type argument as int32
–inside this for each loop use a remove datarow activity, where mention the datatable as DT and row index as Item from for each loop

Hope this would work for sure
Cheers @balkishan

1 Like

Now I have a DTable is my data type variable. where I am using it in For each loop. Can you tell me what is that error.

Fine
mention like this DTable.Rows
and change the type argument as datarow in for each loop property
Cheers @balkishan

I changed the Arguments as datarow, so where I have to mention this DTable.Rows in the Default section bro.

in for each loop input here


change to datarow in type argument
Cheers @balkishan

1 Like

Like this ?

yes @balkishan

1 Like