Hello, good morning, I have the following code.
from openpyxl import load_workbook
from openpyxl import Workbook
wP =load_workbook(r'C:\Users\Arrontec\Desktop\Automatizacion\Request1_2.xlsx')
wB =load_workbook(r'C:\Users\Arrontec\Desktop\Automatizacion\Request1_1.xlsx')
wPs = wP.get_sheet_by_name('Sheet1')
wBs = wB.get_sheet_by_name('here')
counter = 0
new_rows = []
for rrow in wPs.iter_rows():
new_rows.append([])
for cell in rrow:
new_rows[counter].append(cell.value)
counter +=1
for wrow in new_rows:
wBs.append(wrow)
wB.save('Request1_1.xlsx')
But in this case, using append adds it to the end, as you might add it to the beginning of the file.
I would greatly appreciate the help, or some idea that could be given to me. I've been having this problem for some time.