Advertisement
dj_86

metodo Prenchendo

Aug 10th, 2021
1,327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1.     def prencher(self):
  2.         i=2
  3.         for row in self.ws2[0].iter_cols(min_row=2,min_col=2,max_col=2):
  4.             for cell in row:
  5.                 if str(cell.value) in self.dadosWs.keys():
  6.                     dados = str(self.dadosWs.get(str(cell.value)))
  7.                     self.ws2[0].cell(row=i, column=22, value=str(dados[10:20]))
  8.                     self.ws2[0].cell(row=i, column=26, value=str(dados[31:46].strip("{''}")))
  9.  
  10.                 i=i+1
  11.  
  12.         self.wb.save("arquivo.xlsx")
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement