Hi, I have setup a config file stored in excel. I am able to retrieve the values from the excel file as a string into UiPath Studio. However i wish to use the retrieved value not as a string but as an input into a webpage.
For eg. my retrieved string value from excel is as below:
CurrentRow(“XXX”).ToString+" is returned."+Environment.Newline
I wish to use this inside UiPath as in an input to the webpage, however it will simply print it on the screen as is of the whole string. However, i want to it to be a with the value of CurrentRow(“XXX”).ToString + a newline to be used within UiPath in further steps. How do i convert the string to that?
@stareast
Use an “Assign” activity to format the string. You can concatenate the value with the desired text and newline character.
formattedValue = CurrentRow(“XXX”).ToString + " is returned." + Environment.NewLine
Hi, the issue is the value of each retrieved excel data is different to set as config and it will not be easy for me to customise every output from the retrieved string into the native variable to be used by UiPath
Hi, yes my config file was stored in excel, i am able to retrieve it into a datatable and converted to stored into dictionary where i call the Key name and i get the value. All of this works fine, its just that for now the value i retrieved is purely a string and i am not sure how to use it back within UiPath for further processing. For eg. “CurrentRow(“XXX”).ToString” does refer to other values within UiPath in further steps but when i retrieved this value as a string, how do i convert it to be use inside UiPath further steps rather than it being a string of “CurrentRow(“XXX”).ToString”?
Hi, @stareast why are you using a dictionary for this? You can store it directly into an String variable with an assign (or multiple assign) that you can use in an type into activity.
Instead of converting the excel to datatable, use the excel activities directly.
To iterate the each row in the excel, use the For each excel row activity.
Hi, even when i use for each excel row and extract directly and for eg use the output to type into a browser, it gives me the same kind of output with the +Envionment.Newline+
HI, but didn’t you have a datatable already? I have to extract data from excel files all the time in my job and the way I do it is by building a datatable by using an excel application scope + use axcel file + read range and with that read range you have an datatable that you than can use in an for each row in datatable activity and place the values that value in an variable with an assign. Do you use queue items or do you have to extract it and place it directly into your browser application/site?