I have an excel sheet with all the varables of my script. How do I get the value of these variables? I’ve created a datatable with these variable names but i can not get the value of the variable. With a For each i try to get the values with row(“Column0”) but then I get the name of the variable and not the value.
I’m completely new to UiPath so my excuses for asking stupid questions.
Hey Sishiramishra,
Thanks for your prompt reply.
With a read range I put the excel with the varaibles names in a Datatable. And I want to expand this DT with the variables value so it has to become Currency EUR. And now my result is Currency Currency.
Sishiramishra,
Sorry, but what do you mean with single column? The data table or the excel?
The resulting data table has 2 columns.
As you see I’m completely new
Read Range will read entire sheet
When u are using For Each Row it will take first row as Column if in read range u check add headers
Then depending on that columns names u can extract row values say
Row("Currency).ToString
It will give for each iteration Currency column data
With the read range I only read column A and put it in a data table. On this DT I use the for each row and put the result in a new Data table with the variable name and value.
I use For each row. The first column of the output DT is the name of the variable “Currency”. In the 2nd column I want the value of variable currency “EUR”
But my result is as you see currency, currency.
I use {row(“Variable”).tostring ,row(“Variable”)} in the Add Row activity.
So first u do like this
Use Assign DT2=DT.clone()
Add data column for DT2 and Give name of the column whatever u want
Then Use For Each Row
Use Add data row
in array add to DT2 as {Row(“Variable”).ToString,“EUR”}
That isn’t what I want
I’ve exported all the variables that I use in my script. At the end of the script I want an overview of all the variables and their values. Therefore I use the exported list and i want to look up the value of the variable. Variable “Currency” has the value “EUR”. I don’t have to set it to “EUR”.