If you find it troublesome, you can use inheritance and override class methods. I will provide a small implementation idea. The efficiency is relatively low. You can also modify the code to insert multiple rows at a time. It is very convenient to use win32com to operate Excel. How to write it as needed.
Pandas reads into the dataframe, then changes the dataframe, and writes it to excel. The code is the simplest
The method above is pretty good, but it’s troublesome to install pandas. It may not be easy for newbies to handle. I have a stupid method
If you find it troublesome, you can use inheritance and override class methods. I will provide a small implementation idea. The efficiency is relatively low. You can also modify the code to insert multiple rows at a time. It is very convenient to use win32com to operate Excel. How to write it as needed.