import pandas as pd if __name__ == '__main__': d = pd.read_excel('模板.xlsx') alist = d.values.tolist() blist=[] for i in range(len(alist)): blist.extend(list(range(alist[i][0],alist[i][1]+1))) d2 = pd.DataFrame({'UIM':blist}).astype('str') d3 = d2.reindex(index=list(range(0, d2.shape[0]))) d3.to_excel('结果.xlsx')
...