[PYTHON] The only way to get iter_rows back to the beginning with openpyxl is to reload the file with load_workbook.

What I tried to do

--There is a ʻopenpyxl library that can read and write EXCEL with python --ʻIter_rows method can read EXCEL line by line (similar to DB cursor) --If you add a line with ws.append () and then try to process it again from the beginning, the iterator stays at the end and does not return to the beginning.

Thoughts

--There seems to be no method to return this iterator to the beginning --In the old version, there was an argument like "row_offset", but it does not exist in the latest version 3.0.5. --Source code: https://foss.heptapod.net/openpyxl/openpyxl/-/blob/branch/3.0/openpyxl/worksheet/worksheet.py#L405

Correspondence

--Reload the file with load_workbook

environment

Recommended Posts

The only way to get iter_rows back to the beginning with openpyxl is to reload the file with load_workbook.
The easiest way to get started with Django
The fastest way to get camera images regularly with python opencv
Get the path to the systemd unit file
I want to get the path of the directory where the running file is stored.
Python / subprocess> Symbolic link Implementation to get only the destination file name> os.readlink ()
The easiest way to synthesize speech with python
The easiest way to use OpenCV with python
Introduction to Python with Atom (on the way)
Save the object to a file with pickle
I want to get started with the Linux kernel, what is the list head structure?
I tried to touch the CSV file with Python
I want to inherit to the back with python dataclass