Get Row Item: ArrayConverter cannot convert from System.String

I am trying to develop a workflow. I have multiple PDF files in a folder. I want to join each 3 files into one PDF. I have provided input array in excel and output array in excel as well. I am using read range excel activity and stored data in data table. Next I am using Get Row activity in For Each Row activity and saving input array and output array from data table to a variable to use in join PDF activity. But getting subject mentioned error. I have attached the workflow screen shots. Kindly help please.

Regards,
Faisal Shahzad

Hey,
Need more information on this, however with the above error one thing is clear, you string cannot be converted to type array.

How I can attach file here to show the workflow and sequence.

You are new, so it will take some time… you can dm me if it works for you ?

Jut drag the file in the text editor where you are typing your message,

Or press the ‘upload’ button in the toolbare just above it.
image

Don’t use a get row activity. The row already exists as a variable in your for each row in datatable activity. You can directly access it by using row(n).tostring where n is the column number of your extracted range, starting from 0.

Example:
image

This assumes your filename is in the 1st column of your extracted exceldata

Thank you so much for the help. I am using join PDF activity after Assign activity. Variable created in assign activity is being used as input for join pdf. But I am getting error as:
Join PDF Files: The file list must contain at least two files.

Kindly guide please.

The example I displayed up there is how to extract a filename one by one.

You need to collect each individial filename, puth them into an array of and use that as input for yor join PDF activity.

Yeah, that is where I am not finding any solution how to convert that filename (that are string) to array. Than I will use that array into join PDF input.

I am new with Uipath and I am sure I am asking very naive questions. Apologies for it.

Hello!

I think this is the flow that you are looking for:

Here are the details of the activities:

  1. Create array of with the same length as number of rows in the datatable read from excel containing pdf files to be joined. You need to subtract -1 so that the numbers are equal.
    image

  2. For each row in properties create index variable and for that variable assign corresponding values in array - each element in array is a row from data table read at the very beginning

  3. Pass the created array to Join PDF activity

Hope this works for you!

1 Like

Can you please mark my answer as a solution of your issue? Thanks :slight_smile: