大文件读写
from openpyxl import load_workbook
wb = load_workbook(filename='large_file.xlsx', read_only=True)
for row in ws.rows:
for cell in row:
print(cell.value)
from openpyxl import Workbook
wb = Workbook(write_only=True)
ws = wb.create_sheet()
for irow in range(100):
ws.append(['%d' % i for i in range(200)])
>>> wb.save('new_big_file.xlsx')