You can use xlsxwriter module of Python. Have a look at the following example.
import xlsxwriter#from matplotlib import cmdef main(): xlsfile = 'test.xlsx' uid = (['AB',11], ['BC',12], ['CD',13], ['DE',14], ['EF',15]) workbook = xlsxwriter.Workbook(xlsfile) worksheet = workbook.add_worksheet() r = 0 #start row c = 0 #start column for name, id in (uid): worksheet.write(r, c, name) worksheet.write(r, c+1, id) r+=1 workbook.close()if __name__ == '__main__': main()
Output xlsx file has the following data.