首页 > 代码库 > python对excel文件的读写操作

python对excel文件的读写操作

import xlrd,xlwt

data = xlrd.open_workbook(a.xlsx)   #
table = data.sheets()[0]
data_list = []
data_list.extend(table.row_values(0))
for item in data_list:
    print item
#################
#
data =http://www.mamicode.com/ xlwt.Workbook()
table = data.add_sheet(b)
table.write(0, 1, 01)
table.write(0, 2, www)
data.save(b.xls)

http://wenqiang-china.github.io/2016/05/13/python-opetating-excel/

python对excel文件的读写操作