Join different pdfs based on same value in an excel

Hallo,

I have a question, if you could send me in the right direction for finding a solution.

I have multiple PDFs and for each PDF i have a certain value, that its common for 2 or 3 of them - i have an excel with two columns in which i have the name of the pdf and the value for each one.

How could i join the files, based on the value?

Thank you,
Cristi

Hi @Cristian_Ionita

Your post isn’t very clear. Could you try and rephrase your question?

You want to join related PDF files based on words, phrases? Are these duplicates? Give us some more information so we can help you, including an example.

Kind Regards

@Cristian_Ionita

Can you share some more information like providing sample PDF and the excel files

and brief more about what’s the output you are looking for?

Thanks

ok, sorry if i wasn’t very clear from the start.

So basically i have an excel in which i have on one column the bill number and on the other column the pdf file name.

i want to join all the pdf files that have the same bill number.

Hi @Cristian_Ionita ,

I Assume that the Pdf File paths would be present in the Column File Name of your Excel as in the Below Image.

image

We could Perform a GroupBy Based on the Bill Number Column to get the Grouped data of pdf file paths based on the Bill Number. This can be performed by using a Linq Query as Provided Below :

DT.AsEnumerable.GroupBy(Function(x)x("Bill Number").ToString).Select(Function(x)x.Select(Function(y)y).ToArray).ToArray

The Above Linq Query Returns the Grouped Data.

The Joining of the PDF Files is done through the Join PDF Files Activity.

Now, as we have the Grouped data, we can Loop through the Grouped data and Supply the list of file paths from each grouped data to Join PDF File Activity as shown in the Below Image :

Take a Look at the Implementation below :
JoinPdfFiles_ByGrouping.zip (452.3 KB)

If the File Name Column doesn’t contain the full file path, we would need to modify the flow for adding the full path at first and then continue with the remaining flow.

Let us know if this doesn’t satisfy the expected requirements and explain what is the reason.

Thanks a lot - works like a charm :smiley:

1 Like

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