wudongyu

#!/usr/bin/python3.9
# -*- coding: utf-8 -*-
import openpyxl
import os
import redis
rd=redis.Redis(host=\'xx.xx.xx.xx\', port=\'6379\',password="xxx" db=0)
print(rd.hgetall(\'gray_user_list\'))
print(\'当前工作目录 :\')
print(os.getcwd(), \'\n\')
wb=openpyxl.load_workbook(filename=r\'company_id.xlsx\')
sheet=wb[\'1\']
row=sheet.max_row
print(\'取得活动工作表 :\')
active_sheet = wb.active
print(\'表名 --> \' + active_sheet.title, \'\n\')
print(\'表名%s总共行数为%s\'%(active_sheet,row))
#cell=active_sheet[\'A1\']
#print(cell.value)
data_list=[]
for row in sheet.rows:
    for cell in row:
        value=cell.value
        rd.hset("gray_user_list",value,"true")

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-03-04
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-28
  • 2022-01-10
  • 2021-11-26
  • 2021-10-06
  • 2021-07-04
  • 2021-11-27
相关资源
相似解决方案