#!/usr/bin/env python
# --*-- coding:utf8 --*--
# Author:Zhangbb

import openpyxl
import os

wb1 = openpyxl.load_workbook(r'/home/wzr/〖‘“音乐”’〗/leili.xlsx')
wb2 = openpyxl.load_workbook(r'/home/wzr/〖‘“音乐”’〗/wait_del.xlsx')
sh1 = wb1['xinqu']
sh2 = wb2.active

name_list = []

col_list = [ col for col in sh2.columns]
for cell in col_list[1]:
    if cell.value != "‘姓名’":
        name_list.append(cell.value)

for i in name_list:
    print(i, end="   ")
print()

for i in range(2, sh1.max_row+1):
    if sh1[f"B{i}"].value in name_list:
        print(f"<去职>职员:", sh1[f"B{i}"].value)
        sh1[f"N{i}"] = "<去职>职员"
        print(f"N{i} value: ", sh1[f"N{i}"].value)

wb1.save(r'/home/wzr/〖‘“音乐”’〗/leili.xlsx')

wait_del.xlsx中保留的是已<去职>职员(名单),leili.xlsx《中保》留的是区域所有员工(名单),<现在需要在>总表中统计 信息[, 《手工输入贫苦》, 就写了这个小剧本, 目的是在<去职>职员对应<行上标注>“<去职>职员”『字样』