import xlrd
import os
data = xlrd.open_workbook(u’C://Users//sven.pan//Desktop//客户信息3 .xls’, encoding_override=‘utf-8’)
table = data.sheets()[0] # 选定表
nrows = table.nrows # 获取行号
ncols = table.ncols # 获取列号
print(nrows)
print(ncols)
for i in range(1, nrows): # 第0行为表头
alldata = table.row_values(i) # 循环输出excel表中每一行,即所有数据
result = alldata[0] # 取出表中第1列数据
# print(result)
cmd = f’acli jira --action addCustomFieldOptions --field 客户 --options {result} --server https://jira.com --user passwd --password 1314’
# print(cmd)
try:
os.system(cmd)
except:
print(cmd)