Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k points)

I am creating a UI Path bot and using the Excel Read column activity to read contents of a column. I want to use this as text to use somewhere down the line but now the Excel read Column activity outputs an IEnmerable(Object) and I want to pass this to a variable that is a string. So far I am getting an error when I use the following:

myTextString = CType(myIEnumerableObject, String)

or

myTextString = myIEnumerableObject.ToString  (this is simply stored as System.Object)

or

myTextString = CStr(myIEnumerableObject)

What I need is to be able to convert this object to a string, store it in a string variable and be able to re-use it later.

Thanks

1 Answer

0 votes
by (29.5k points)
you could try the following to rectify the issue

String.Join(<seperator>,myIEnumerableObject) in an Assign activity, where <seperator> specifies the seperator between each element in your IEnumerable:

String.Join(",",myIEnumerableObject) provides a comma separated string.

Related questions

0 votes
1 answer
asked Jul 18, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 10, 2019 in RPA by Abhishek_31 (12.7k points)

Browse Categories

...