新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

python进行两个表格对比的方法-创新互联

如下所示:

成都地区优秀IDC服务器托管提供商(创新互联).为客户提供专业的服务器托管,四川各地服务器托管,服务器托管、多线服务器托管.托管咨询专线:18982081108
# -*- coding:utf-8 -*-
import xlrd
import sys
import re
import json

dict1={}
dict2={}
mylist=[u'系统运维管理',u'安全管理机构',u'安全管理制度',u'人员安全管理',u'网络安全',u'物理安全',u'网络安全',u'主机安全',u'应用安全',u"网络安全",u"主机安全",u"主机安全",u'系统建设管理']
def check():
  data=xlrd.open_workbook('test.xls')
  for i in range(0,13):
    print u"第%s个表格"%(i+1)
    print mylist[i]
    print "-"*60
    try:
      table=data.sheets()[i]
    except IndexError,e:
      break  
    nrows=table.nrows
    count=1
    if i<5:
      m=10
    else:
      m=16
    for j in range(m,nrows):
      cell_1=table.cell(j,2).value
      #print cell_1,
      cell_2=table.cell(j,3).value
      nu=re.split(r'\)',cell_2)
      num=re.split(r'\)',nu[0])
      if num is not None:
        #print num[0],
        pass
      else:
        print u"没有标记序号"
      try:
        if j                
网站名称:python进行两个表格对比的方法-创新互联
文章转载:http://www.wjwzjz.com/article/giggo.html
在线咨询
服务热线
服务热线:028-86922220
TOP