How to add multiple data in a single asset

Hi,i need to read a excel and add multiple data in a single asset separated with semicolon how can i do that

@asiya_sultana,

Welcome to the UiPath Forum :tada:

  1. Read the data into DataTable from Excel using Read Range
  2. Use Output DataTable to output the DataTable to a string Variable
  3. 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 :slight_smile:

Hi,

Welcome to the community! :tada:

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.

1 Like

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

@asiya_sultana,

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.

1 Like

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.