String Split Error

Hey Everyone, I am using Split String, but I am not able to get it done right.
Please correct me on the same.

This is workflow
image
I am usign Get Visible Text Activity to get the text and then Saving it in a variable named “EEE”.
Later, I am using Assign activity to split the string.image

I Expect to store the output of string. split to stored in a variable named “EEE2” which is string array.

Now when I use a message box in Uipath about the to display “EEE2” it shows the output:- “System.String”.

Please assist me on the same.

Split will return you the array @Aditya_Bhalerao,

so if the required value is before the character you are splitting, give it as eee.split("No. ")(0) . or if it is after the character, give it as (1)

@Palaniyappan, @AshwinS2, @Achal_Sharma, @HareeshMR, @kirti.iyer, @jitendra_123, @pablito

Kindly Assist on the same.

1 Like

Hi
whenever we mention a string array in message we need to mention them along with index position to retrieve the value from that position
so in your case use FOR EACH activity where pass this EEE2 as input and change the type argument as string in the propertypanel of the for each loop
–then inside the loop use a message box and mention like this
item.ToString

this will display all the elements in the array

hope this would help you
Cheers @Aditya_Bhalerao

1 Like

@HareeshMR,
I want to write this value into a Excel Sheet. Only the EEE.Split("No. ")(1) .
How do I do that ?

1 Like

we can use WRITE CELL activity and mention this EEE2(1).ToString as input value and mention the cell position where we want to enter this value

or if we are iterating through a for each row loop then we can use a assign activity and mention like this
row(“yourcolumnname”) = EEE2(1).ToString

Cheers @Aditya_Bhalerao

1 Like

kindly let know for any queries or clarification
Cheers @Aditya_Bhalerao

1 Like

Write Cell
EEE2 As String
Assign EEE2=EEE.Split(" ".ToCharArray)(Index)

For Each Row
Assign row.Item(“ColumnName”)=EEE.Split(" ".ToCharArray)(Index)

1 Like

@Palaniyappan @kirti.iyer

I want to get text from a website and paste it in an excel sheet in a particular column. But I want to paste it in the immediate empty row. I know I should use counter, but I am unable to do it. Kindly assist on the same.

May i know the issue we were facing
Cheers @Aditya_Bhalerao

I am not able to use “WRITE CELL” activity in uipath. So the bot types in the Excel Sheet in the row which is the immediate vacant cell. Refer the image.
image
I want the bot to type in the cell no. 17 and after it is done . I want the bot to type into 18 and so on.

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