(Jan-24-2021, 11:05 AM)ibreeden Wrote: I am sorry, I was completely wrong. The problem lies somewhere else. The problem is the definition of gettags[]. This should be a two dimensional list. Each item of gettags[] should be a copy of gettags2[]. Can you change this:
for x in range(len(gettags2)):
gettags.append(gettags2[x]) #Loop until All Tags are Added to List
... to this:
#append slice of gettags2, containing the entire gettags2
gettags.append(gettags2[:])
(You must use the slice operator [:] to make a copy or else a reference will be made to gettags2.)
Then also change the following:
for r in gettags:
#_ = ws1.cell(column=col, row=row, value= gettags2[1]) #"{0}".format(get_column_letter(col)))
column_cell = 'A'
ws1['A1'] = 'Album'
ws1[column_cell + str(row + 1)] = gettags[0]
...
Instead of gettags you should use r:
for r in gettags:
#_ = ws1.cell(column=col, row=row, value= gettags2[1]) #"{0}".format(get_column_letter(col)))
column_cell = 'A'
ws1['A1'] = 'Album'
ws1[column_cell + str(row + 1)] = r[0]
...
... and then the same for all columns.
There is an inefficiency in your program. Why fill the header on row 1 each time again?
Let me know if it works.
Quote:I have put the headers before the loop starts so it does it only once. Did not think about those changes Thanks for that. When I applied the changes unfortunately it did not apply the tags of each song it only did the last song MP3 Tags in some cells. What updates can I make to update the cells? Thanks