I have two data tables that store different information, I am going through DU and extracting the information from those forms, I have two built two data tables and I have two merge data tables so I can add write to the excel.
The problem im facing:
Once I know the document I have to process the extracted results will write into a excel file. this happens perfectly for information stored in dt1 to excel1 but when it runs the 2nd document that does not belong to dt1 it extracts the information from the 2nd document including results from excel1.
My build data tables
this is merging part
the else if Identifies the document and writes to that excel but in my case it runs first files belonging to same document perfectly into the first excel but when it runs a different document belong to another excel it merges the first document extracted to the 2nd excel with the extracted information from the 2nd document.
how can I solve this?