from collections import OrderedDict import xlwt with open('student.txt','r') as f: number_list = json.load(f,object_pairs_hook=OrderedDict) wb = xlwt.Workbook() ws = wb.add_sheet('number') for row,number_arr in enumerate(number_list): for col,number in enumerate(number_arr): ws.write(row,col,number) wb.save('number.xls')