Skip to content Skip to sidebar Skip to footer

Copying To A Specific Sheet: Openpyxl - Destination Sheet Ignored When Using Copy_worksheet

Per this answer and these documents I tried to specify a source and target sheet to write to, but when I do, the results are the same as if I hadn't specified a target: from openpy

Solution 1:

# new copied sheet was assigned to target
target = wb.copy_worksheet(wb.source_sheet)

# now just change the name to desired one
target.title = desired_name

Post a Comment for "Copying To A Specific Sheet: Openpyxl - Destination Sheet Ignored When Using Copy_worksheet"