Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.8k points)

I'm working on some code on UiPath, trying to split this string "2700/30" so that i get 2700 and 30 seperated.

Tried this "2700/30 “.split(”/"c)(0) but doesn't work, i get my data from excel file, before storing this data into variables i use .toString

PS: Error, says that it can't convert from string to char

1 Answer

0 votes
by (29.8k points)
HI, so basically string.split gives you an array of strings and row(0).toString gives you data of the first column of the datatable you are using as a string

so simply use the following assigns

var1= row(0).ToString.Split("/"c)(0)

var2 = row(0).ToString.Split("/"c)(1)

let me know if this works for you

Related questions

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.6k users

Browse Categories

...