Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- start = time.time()
- sap = self.wb_sap.worksheets[0] #Sets The First Sheet in the Excel Workbook as the variable sap IN THE FUTURE THIS WILL BE MODIFIED TO BE THE SAME NUMBERED SHEET AS BEFORE
- wt = self.wb_wt.worksheets[1]#Sets the Trimmed Sheet in the Second Report as the var wt
- #This Set of Nested Loops goes through Tests for X's to T's Based on the Report - Report Comparison
- print(datetime.datetime.today())
- for saprow in sap.iter_rows():
- for wtrow in wt.iter_rows():
- if (saprow[3].value == wtrow[3].value and (saprow[2].value == wtrow[2].value)):#Material&OpCode Match
- if wtrow[4].value in ("T","P"): #New Report Entry is Marked as T/P
- self.deadrows.append(wtrow)
- if saprow[4].value is "X": #Old Report Entry is Marked as X
- self.XT += 1#Increment X->Ts Counts
- else:
- self.TT += 1#Increment T->T Count
- elif wtrow[4].value in ("T","P"):
- self.deadrows.append(wtrow)
- elif wtrow not in self.deadrows:
- self.goodrows.append(wtrow)
- print("Timing: ", endtime-start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement