import os import shutil import numpy as np from tkinter import filedialog, Tk from os import getcwd from re import findall import xlwt def print_hi(name): # Use a breakpoint in the code line below to debug your script. f = xlwt.Workbook(encoding='utf-8',style_compression=0) # 创建workbook,其实是execl sheet1 = f.add_sheet('Sheet1', cell_overwrite_ok=True) style1 = xlwt.XFStyle() # 设置单元格格式为文本 style1.num_format_str = '@' for i in range(0, 110): for j in range(0, 30): sheet1.write(i, j, style=style1) f.save(r'E:\老人卡\XXXXX操作员.xlsx') print(f'Hi, {name}') if __name__ == '__main__': print_hi('Linlili~~~~~')