Skip to content
Advertisement

How to write to new empty cell in openpyxl

I see there are a few similar questions already asked, but none seem to solve my problem. Also, some offer deprecated solutions such as using coordinate.

The code I have works fine, but because I start the loop at a certain position, every time I re-run the code, it obviously starts writing from that one position. I’m looking for the most pythonic and up-to-date solution to this.

Thanks in advance for your time and help.

JavaScript

Advertisement

Answer

You can use max_row and append from openpyxl.worksheet.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement