I believe you would not need the Do While loop to loop through the different Pages in one Invoice Document, as there would only be a Single table present in one PDF document.
Try to remove the Do While loop and use the Extract Structured Data Activity and Write Range Activity from it before the Close Application.
I would like to thank you for your help I think you were right it helped to solve the problem but I still have an issue with the first pdf data it is repeating in each file
you can check the order information folder and you will see.
I appreciate it if it is possible to have a look and share your feedback.
The correction again would be to use only the Extract Structured Data and Write Range Activities in the Then part of If and remove the whole If, as there is no looping of the pages to be done, even that part is not necessary.
Also, Could you add the below Expression in the Assign Activity before the Close Application.
ExtractedDT = new Datatable
This will erase the data in the datatable after it is already written to the Excel sheet, so that when used again, it will only contain the new data from next PDF document table.