Iterate through worksheets in workbook- Python Nested For loop
<p>I am trying to open an excel workbook and iterate through each of the worksheets in a loop. Here is first loop:</p>

<pre><code>wb = openpyxl.load_workbook('snakes.xlsx')
for i in wb.worksheets: 
    i= 0
    wb.get_sheet_names()
    i = i + 1
</code></pre>

<p>Once I can successful go through each one of these worksheets, i would like to do a nested loop which takes each one of my png files and places them in the worksheets. It is important to note that the sheet names and the png files have the same names (country names) stored in a dataframe called country_names. </p>

<p>Second loop:</p>

<pre><code>for ws in wb.worksheets: 
    img = openpyxl.drawing.image.Image(folder + str(var) + '.png')
    ws.add_image(img, 'K1')
    wb.save('snakes.xlsx')
</code></pre>

<p>Any ideas on how to do the nested for loop so the code loops through the images and write them to the worksheets?</p>