Python读写excel

 1 #-*- coding:utf-8 -*-
 2 #__author__ = 'liu-ke'
 3 import xlrd
 4 from xlutils.copy import copy
 5 mybook = xlrd.open_workbook("E:liu-keuser.xls")
 6 mysheet = mybook.sheet_by_name("name")
 7 j=mysheet.nrows
 8 b=copy(mybook)
 9 c=b.get_sheet(0)
10 c.write(9,1,"liu-ke")
11 b.save("E:liu-keuser.xls")
12 
13 
14 for i in range(1,j):
15     print mysheet.cell(i,0).value
原文地址:https://www.cnblogs.com/liu-ke/p/4442333.html