I have one Excel file i have to identify the company type there is one condition After Blank row only one row and then again blank row then it should be single company and if after blank row. there is multiple rows. and after that again blank row then it should be multiple company and i want to seggregate single and multiple company.
how i can achive this anyone could help me it would be great.
I am Attaching screenshot to understand better
create a string variable str and initially assign with single
Read the file into datatable
then use for each row in datatable activity…and in the properties panel assign a variable to index property say index
inside loop use if condition with index+1=dt.Rowcount
on else side use if condition with currentRow("CompanyCode").ToString.Trim.Equals(String.Empty)
now on then side of second if add assign with str = “Single”
on else side add if condition with str.Equals("Single") and dt.Rows(index+1)("CompanyCode").ToString.Trim.Equals(String.Empty) on then then side assign str ="single" and else side str ="Multiple"
Now on the very first then side do nothing
Now after then condition check str value if it says single then it is single else it is multiple
that is to seggregate i mentioned as single and multiple…in excel i am not checkignf or it…i am deciding based on first column values if it is single or multiple based on previous and next rows