🖐🏻 免责声明
本教程仅供学习交流使用,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关,请各读者自觉遵守相关法律法规。
# 安装
pip install openpyxl
# 使用
import openpyxl
self.xls = openpyxl.Workbook()
self.sheet = self.xls.active
self.sheet.title = "Sheet1"
self.sheet.append(["标题", "创建时间", "开店方式", "合作期限", "面积要求"])
title = item.get("title", "")
createTime = item.get("createTime", "")
openMethod = item.get("openMethod", "")
cooperationLimit = item.get("cooperationLimit", "")
areaRequire = item.get("areaRequire", "")
self.sheet.append([title, createTime, openMethod, cooperationLimit, areaRequire])
self.xls.save("result.xlsx")

