def write_xls(file_name, sheet_name, headings, data, heading_xf, data_xfs):
    book = xlwt.Workbook()
    sheet = book.add_sheet(sheet_name)
    rowx = 0
    for (colx, value) in enumerate(headings):
        sheet.write(rowx, colx, value, heading_xf)
    sheet.set_panes_frozen(True)
    sheet.set_horz_split_pos((rowx + 1))
    sheet.set_remove_splits(True)
    for row in data:
        rowx += 1
        for (colx, value) in enumerate(row):
            sheet.write(rowx, colx, value, data_xfs[colx])
    book.save(file_name)
def write_xls(file_name, sheet_name, headings, data, heading_xf, data_xfs):
    book = xlwt.Workbook()
    sheet = book.add_sheet(sheet_name)
    rowx = 0
    for (colx, value) in enumerate(headings):
        sheet.write(rowx, colx, value, heading_xf)
    sheet.set_panes_frozen(True)
    sheet.set_horz_split_pos((rowx + 1))
    sheet.set_remove_splits(True)
    for row in data:
        rowx += 1
        for (colx, value) in enumerate(row):
            sheet.write(rowx, colx, value, data_xfs[colx])
    book.save(file_name)