title: Copying image from a worksheet using openpyxl
body: <p>I have a Python program that creates a new excel file based on some worksheets from a few other files. The following code I have copies the worksheets perfectly, but is unable to copy the image that is present in the worksheet. How do I copy images in an Excel worksheet to another Excel workbook using Python?</p>
  
  <pre><code>path1 = "/mnt/e/RecEasy-MVP-Python/FlaskApp/Uploaded_files/" + key
  print path1
  path2 = "/mnt/e/RecEasy-MVP-Python/FlaskApp/Compiled/"  + current_acc_group + "_" + current_gl_account + ".xlsx"
  print path2
  path_to_key_sheet = "/mnt/e/RecEasy-MVP-Python/FlaskApp/Uploaded_files/" + key + "_key_sheet.txt"
  print "Path to key sheet file:"
  print path_to_key_sheet
  
  wb1 = xl.load_workbook(filename=path1, read_only=True, data_only=True)
  ws1 = wb1.worksheets[2]
  counter = 0
  for sheet in wb1:
     if (str(sheet.title) == str(content_of_key_sheet_file)):
         ws1 = wb1.worksheets[counter]
         print "Sheet selected"
         print sheet.title
     counter = counter + 1
  
  ws2 = wb2.create_sheet(ws1.title)
  print "Copying from the Excel file: " + path1
  for row in ws1:
     for cell in row:
         if (cell.value != None):
            ws2[cell.coordinate].value = cell.value
  
  wb2.save(path2)
  </code></pre>