I'm writing a script that will pull data from an API and store it in an Excel spreadsheet. I'm using Openpyxl for this process. The only issue I'm running into is that when I try to add to the end of an existing cell, that cell is just deleted and replaced by what I'm adding in. Can someone please tell me a great way that I can comma separate these values in the same cell instead of having them replace one another, I'd really appreciate it.
#Make sure that there is a game listed for them
try:
while games['games'][x]['name']:
alist.append(games['games'][x]['name'])
x = x + 1
#After there are no more games, iterate through the list of games
# and add them to the spreadsheet
except IndexError:
y = 0
try:
while alist[y]:
ws['B'+str(namecount+1)] = alist[y]
y = y + 1
except IndexError:
alist.clear()
It looks like whenever it's going through the 2nd while loop, instead of adding to the existing cell it's just deleting it. I've looked through the Openpyxl documentation and cannot find anything that will help me iterate through my list and then add each entry in the list, separated by commas, into the same cell. Any help would be greatly appreciated!