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.

CurrentRow(“Column1”).tostring+CurrentRow(“Column4”).tostring

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

@Ping_Pong

Is that Assign is inside the For Each Row activity?

Hope this help you

Thanks

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

Hi,

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

Example
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.