I have a list of some values in Python and want to write them into an Excel-Spreadsheet using openpyxl.
So far I tried, where lstStat is a list of integers that need
Openpyxl does not allow you to write lists in excel cells, however if you convert the list into a string you can paste it into excel.
e.g. This would cause an error
my_list = ['1','2','3']
ws.cell(row=r, column=1).value = my_list
However this would paste the string of the list into excel
my_list = ['1','2','3']
new_list = str(my_list)
ws.cell(row=r, column=1).value = new_list