Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. wb = openpyxl.load_workbook(r'C:Usersdaymon.rebacRotinasARQUIVO.xlsx')
  2.  
  3. ws = wb ["Sheet1"]
  4.  
  5. img_logo = r"C:Usersdaymon.rebacRotinasCROSS.jpg"
  6.  
  7. imagem_logo = openpyxl.drawing.image.Image(img_logo)
  8.  
  9. img_hpf = r"C:Usersdaymon.rebacRotinasFPH_VZ_AR.jpg"
  10.  
  11. imagem_hpf = openpyxl.drawing.image.Image(img_hpf)
  12.  
  13. ws.add_image(imagem_logo, 'A1')
  14.  
  15. ws.add_image(imagem_hpf, 'D1')
  16.  
  17.  
  18. wb.save(r'C:Usersdaymon.rebacRotinasARQUIVO.xlsx')
  19.  
  20.  
  21. wb.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement