Data column as a string

Hi there,

I’m new to UiPath, I need help to get a column as a string from an excel sheet and it has the invoice numbers where each row contains some values where I need to search with them on a website.

Column 1 column4
123 Vskp
456 TTnop
789 njsnxns

I want to take get each value from column1 and column 4 together.
I am passing value as: DT_Output(“Coumn 1”=+column4+)(0)(4).ToString
where am getting compilation error.
Please help me out, thanks in advance.

Hi @Ping_Pong ,

You have to use for each row loop to loop the values one by one from datatable.

Use For each row loop assign your datatable into it.

Inside for each loop use the expression like below.


Assign above value to finalvalue = CurrentRow(“Column1”).tostring+CurrentRow(“Column4”).tostring

And use this finalvalue in website for your searching.

Hi @kirankumar.mahanthi1
I am getting this error when assigning the value

Use workbook read range to get the excel data into datatable. Please use for each row loop and use the suggested expression inside of the loop. Thanks


Is that Assign is inside the For Each Row activity?

Hope this help you


Hi @kirankumar.mahanthi1 @Srini84

Thanks for the reply, But I am getting an error

My excel column name is “Invoice” and another column name is “Company name”

Expression :CurrentRow(“Invoice”).ToString+CurrentRow(“Company Name”).ToString

Error:Assign: Column ‘Invoice’ does not belong to table DataTable.

Please help


Could you pls check whether the column name invoice is correct and check if any spaces are there. thanks.

Thank you guys @kirankumar.mahanthi1 @Srini84

your welcome @Ping_Pong .

I have one more query, please help me with as well

I have the “invoice” number as a string I want to search them on excel; and required company name as out put

Invoice Company
123 TCS
346 Wipro
6578 Niclos

So If I have invoice number as “6578”, I want output as “Niclos”

Please give any suggestions, thanks in advance.

Could you please raise it as new issue so this is different question. our forum members would help you much better. thanks for understanding.

Okay Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.