Issue with join pdfs

Hi all, i’ve an issue with join pdf files action.

I’ve an excel file with a name of techincal drawing for production.
I’ve make an action that read name from B column of excel file, add path, check if file exist then add file in a list and then join all pdfs in one pdf.

All works flawless, but the last one no.
Can someone help me? Thank you (42.2 KB)

@Danny_Gi - I have reviewed your xaml. Since there is no sample excel file was available in the zip file, i am not able to debug it.

Could you please share the sample spredsheet? Also, Please print that ElecnoPDF variable outside of the loop using String.join(vbcr, Elecnopdf) and see what values are getting printed, because this the base for your JoinPDF activity…

Sorry for the late!

This is it (475.2 KB)

@Danny_Gi - Done…its fixed…your code was almost perfect except the Join pdf activity…

Please find the fixed workflow (470.1 KB)

Run this workflow as is, you will see the final pdf gets created in the project folder.

Change i made was : ElencoPDF.toarray … :wink:

If this solves your query, please mark this post as solution.

1 Like

Thank you a ton!
Please can you explain me why need to add a line for array to join pdf?
Just for my comprension.

1 Like

@Danny_Gi -

Glad to assist you… Sure, because ElecnoPDF is String List and Join PDF files accept String Array. So in order to convert the List to Array I have added .toarray…

1 Like

Uhm ok! And the difference between list and array? Sorry for my noobish

@Danny_Gi - Here are the differences…

  • An array is a fixed-size structure for storing multiple objects. A List is a simple collection, which you can think of as a dynamic array.
  • A List allows you to add, insert and remove items and the collection will grow and shrink accordingly.
  • With an array you create it with a specific number of elements and that size never changes. Think of it like an egg carton that always has the same number of cups. They may be occupied or empty but they are always there.
  • To resize an array you must actually create a new array and copy the existing elements across.
  • With a List you just call the Add method and the collection grows by item.
1 Like

ok ok. If i understand correctly when i’ve finish to collect item to array i can’t add more item. The array list can’t grow or resize.
List is dynamic array! youre the man!

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