Get empty cell coodinates with openpyxl
<p>I work at a script to extract some very messy data from a huge excel file and I run into a bump. 
There is any way to get coordinates from an empty cell with openpyxl?</p>

<p>This will return an error saying EmptyCell has no row/column attribute</p>

<pre><code>for row in sheet.iter_rows():
    for cell in row:
        if cell.column is ... :
           print(cell.value)
</code></pre>

<p>I cannot skip the empty cells, as there are empty cells in some columns that have to taken into account and extracted as such in the new file.
Also, I cannot fill the empty cells because the original file is huge and its opened read only because of this.</p>

<p>There is any way to do this with openpyxl or I should try to use another library?</p>

<p>Thanks!</p>

<p>EmptyCell's are special cells in the read-only context: they are fillers created where there are no cells in the original XML so that rows from a range are of equal length. As such they do not really exist and hence do not have coordinates. If you need their coordinates then you can simply use <code>enumerate</code> to count for you while looping.</p>

python excel openpyxl