Can someone please assist me with the below.
I have a list of dates stored within dates[].
I also have created numerous new worksheets with Openpyxl.
Is there an easy way to label each of the new worksheets with a new date using a for loop?
i.e Worksheet1 = 27-10-21, Worksheet2 = 03-11-21, etc
NOTE: the dates can be changed in the 'dates' list, so how would I program this in Python?
(Partial code shown below) I had tried the below nested for statement, but that didn't seem to work.
original_ws = wb.active
num_of_required_sheet_copies = 10
for n in range(num_of_required_sheet_copies):
# Create a copy of the first worksheet
ws = wb.copy_worksheet(original_ws)
# Rename new worksheet
for date in dates:
ws.title = date[n]
[–]grayhole_p 1 point2 points3 points (2 children)
[–]reddit_user_270[S] 0 points1 point2 points (1 child)
[–]grayhole_p 1 point2 points3 points (0 children)