title: How to transfer data from one worksheet into another using python in the same workbook?
body: <p>I want to transfer my data which is in 'Sheet1' into worksheet 'Sheet2'in the same workbook, using python.I have written the script below, but facing an <strong>'IndexError: list index out of range'</strong>. I know this is not the best way to go about it. I will appreciate if anyone can guide me with a more efficient way to go about it. I am sharing the Snapshot of excel file below </p>
  
  <p>Can I directly enter <strong>'Sheet1' cell value ---> 'Sheet2' cell value</strong> rather than doing   <strong>'Sheet1' cell value ---> List---->'Sheet2' cell value</strong>?</p>
  
  <p><a href="https://i.stack.imgur.com/Wrfqg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wrfqg.jpg" alt="enter image description here"></a></p>
  
  <pre><code> import openpyxl  
   wb = openpyxl.load_workbook('C:\Users\laban\Desktop\Par-emails1.xlsx') 
   type(wb)
   wb.get_sheet_names() 
   sheet = wb.get_sheet_by_name('Sheet1') 
   type(sheet)  
   anotherSheet = wb.active
   sheet1 = wb.get_sheet_by_name('Sheet2')
   type(sheet1)
   par=[sheet.cell(row= col, column=1).value for col in range(1, 2450)]
   email_no=[sheet.cell(row= col, column=2).value for col in range(1, 2450)]
   Domain=[sheet.cell(row= col, column=3).value for col in range(1, 2450)]
   email=[sheet.cell(row= col, column=4).value for col in range(1, 2450)]
  
   for x in range(0,2450):
        if email_no[x]&lt;9:
            sheet1.cell(row= x+1, column=1).value=par[x]
            sheet1.cell(row= x+1, column=2).value=email_no[x]
            sheet1.cell(row= x+1, column=3).value=Domain[x]
            sheet1.cell(row= x+1, column=4).value=email[x]
  
  
   wb.save('C:\Users\laban\Desktop\Par-emails1.xlsx')
  </code></pre>