Need help on this

sequence1 sequence2 Add%20data%20row%20editor

@UiPathMaster First value in the ArrayRow in written incorrectly.

You have written split(val,"."),(0).ToString instead of split(val,".")(0).ToString

Check for other values in ArrayRow also and check for null value in those by printing.

Also check for output variable in Read Range activity.

Set default value of datatable variable to New DataTable().

Try Invoke method instead of add row activity.

In above image,

  1. Set tagetObject property as output datatable variable(which has same number of columns as
    input and same datatype)
  2. MethodName as ImportRow
  3. Parameters property

    Set direction as “In” Type as “datarow” and value as for each datarow variable in your case “row”(give without quotes)

Hi Manju,

Thanks for the help, i have corrected that line still getting the same error and i am not able to use invoke method for this thing as ImportRow method is not available for datatable.

@UiPathMaster Can you upload your workflow?

Kindly check once with the value of variable val
this error usually occurs when there is no value in it
use a write line and try to display the value of the val and check once
if possible share that screenshot from output panel
that could help us validate this
Cheers @UiPathMaster

I have checked that value is there, i am getting error while using Add Data Row.

@UiPathMaster Did you create required of columns for final datatable?

I have attached the Xaml and my aim is to add all data inside datarow then write those values in excel sheet.
where exactly you want to see columns for datatable.
I am able to do it without using Add Data Row as you can see it in Xaml , but that would be time taking if data volume increases.

@UiPathMaster Can you provide sample excel file?

You are assign the value from row .so in row only one Value store and you get the same

1 Like

(moderated - private data)

@UiPathMaster Please check xaml and output file below.

(moderated - private data)

(moderated - private data)

Thanks Manju,
Now i get to know what was my mistake
One more thing is there any way to print all zero’s as it is in excel, because these zeros are in general format after the execution, prints only one zero instead of actual no of zeros.

1 Like

@UiPathMaster Please check below files.

(moderated - private data)

(moderated - private data)

For which ever you want retain leading zero’s, you have to keep single quote before it. Please check add datarow activity.

1 Like