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
You want to use 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.