To do something when cell is not empty add:
if cell.value:
which in python is the same as if cell value is not None (i.e.: if not cell.value == None:)
Note to avoid checking empty cells you can use
worksheet.get_highest_row()
and
worksheet.get_highest_column()
Also I found it useful (although might not be a nice solution) if you want to use the contents of the cell as a string regardless of type you can use:
unicode(cell.value)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…