DataTable : C# " Add Data Row : Cannot implicitly convert 'string to 'Object[]'

Hi ,
I new bee to UiPath and am trying to add a variable to a DataTable with one column and 1 row , my variable is of type string but i am getting a message at Add Data Row activity as “Cannot implicitly convert 'string to ‘Object’”.


an Object Array is expected for the ArrayRow Parameter, so use following instead: {TestVar}

I tried{TestVar} this too and here is result,

close {TestVar}; ← with a semi colon or try below

new Object[ ] { TestVar };

kindly note the closing ;

1 Like

Awesome , This worked . Thanks.