Assign activity uipath


EmployeeDetails(1).xlsx (9.1 KB) The Excel file you can check then and solve the add data row activity error

I wrote this - CurrentRow(“Emp ID”).ToString + CurrentRow(“Name”).ToString +CurrentRow(“Email”).ToString + CurrentRow(“Position”).ToString

And the error is - value of the type “string” cannot be converted to “Object”

please help me

Hi @UJJVAL_BHAGAT

What are you exactly trying to do can you specify. And what is the expected output from the given input excel file.

Or try this:
New Object() {CurrentRow("Emp ID").ToString + CurrentRow("Name").ToString +CurrentRow("Email").ToString + CurrentRow("Position").ToString}

Regards

1 Like

@UJJVAL_BHAGAT

New object(){CurrentRow(“Emp ID”).ToString + CurrentRow(“Name”).ToString +CurrentRow(“Email”).ToString + CurrentRow(“Position”).ToString}

Or

New object(){CurrentRow(“Emp ID”).ToString,CurrentRow(“Name”).ToString ,CurrentRow(“Email”).ToString , CurrentRow(“Position”).ToString}
2 Likes

Hey @UJJVAL_BHAGAT

Pass:

{CurrentRow(“Emp ID”).ToString, CurrentRow(“Name”).ToString, CurrentRow(“Email”).ToString, CurrentRow(“Position”).ToString}

In Array Row property, you will get expected output!

If facing Error, just remove “ (quotes) and rewrite “ (quotes) in the query.

Regards,
Ajay Mishra

this error is CurrentRow is not declared so what should be do

ArrayRow has to be…an array.

{CurrentRow("Emp ID").ToString,"Another value","etc..."}

not correct wait first of all check the excel files and check the header and also value and give the answer
thank you

It is correct. ArrayRow must be an array, you are giving it a string. I have used this activity many times.

@UJJVAL_BHAGAT Can you share a screenshot of your workflow or .xaml!

Regards,
Ajay Mishra

Hi @UJJVAL_BHAGAT,

you can use this in add data row action
{CurrentRow(“Emp ID”).ToString,CurrentRow(“Name”).ToString,CurrentRow(“Email”).ToString,CurrentRow(“Position”).ToString}

by using this you can write data in cells, it looks like this
image

Or
if you want to write all details in one cell, then you can use below expression
new Object(){CurrentRow(“Emp ID”).ToString+" “+CurrentRow(“Name”).ToString+” “+CurrentRow(“Email”).ToString+” "+CurrentRow(“Position”).ToString}

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