摘要:
import sys reload(sys) sys.setdefaultencoding('utf8') import xlrd import xlwt book = xlrd.open_workbook('C:/Users/13717/Desktop/sg.xls') sheet = book.sheet_by_index(0) book1 = xlwt.Workbook() #创... 阅读全文
摘要:
import xlrd book = xlrd.open_workbook(file_path)#打开文件 sheet = book.sheet_by_index(0) #获取第一个工作簿 print sheet.nrows,sheet.ncols #打印行数,列数 for i in range(sheet.nrows): print sheet.row(i)[0].value ... 阅读全文