使用openpyxl处理xlsx文件

#coding=utf-8

from openpyxl import Workbook
from openpyxl import load_workbook

inwb = load_workbook("E:\Letter9.xlsx")

# outwb = Workbook()

for sheetName in inwb.get_sheet_names():
    # if not sheetName.isdigit():  #如果表名不是数字,不处理
    #     continue
    sheet = inwb[sheetName]
    sheet.cell(coordinate=None, row=6, column=7).value = None

inwb.save("E:\Letter9.xlsx")


参考:https://www.cnblogs.com/sun-haiyu/p/7096423.html
https://www.cnblogs.com/joyeecheung/p/3842002.html
   http://blog.csdn.net/jollypigclub/article/details/46696315
    
posted @ 2018-01-10 15:55  carlvine  阅读(78)  评论(0编辑  收藏  举报