Hi,i need to read a excel and add multiple data in a single asset separated with semicolon how can i do that
Welcome to the UiPath Forum ![]()
- Read the data into DataTable from Excel using Read Range
- Use Output DataTable to output the DataTable to a string Variable
- Use Set Asset activity and pass the string variable to Text type Asset.
Remember one thing, there could be limit of number of characters you can assign to it.
Thanks,
Ashok ![]()
Hi,
Welcome to the community! ![]()
You can append the values with semicolon in a string variable and using Set Asset activity you can add the value to asset. Note that the Labels and key/value properties are limited to 256 characters.
just share with us some sample data as the request can be understood in multiple directions
e.g. read from all rows 1 column
String.Join(";", dtData.AsEnumerable.Select(Function (x) x("ColName").toString.Trim))
or the entire datatable
or β¦
Thank you so much, The output datatable cannot be converted to a string variable right
It can be using Output DataTable activity.
It will be random numbers like OTP
still it should be possible to tell us the details like
- entire datatable
- rows / cols subset
β¦
The data will be in this form X78egsjd,Gwudk522,Jdkw24hs
Can you give us more detail about what youβre trying to accomplish? There are probably better ways to achieve your goal.
lets avoid ping-pongs
when X78egsjd,Gwudk522,Jdkw24hs in an single Excel Cell
strTransformed = YourRowVar(ColNameOrIndex).toString.Trim.Replace(β,β,β;β)
OR
strTransformed =
YourRowVar(ColNameOrIndex).toString.Trim.Split(","c).Aggregate(Function (x,y) x.Trim & ";" & y.Trim)
when
then
and also for the entire DataTable you had got some suggestions.
How do add those in a single string separated with semicolon
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.