openpyxl 创建表后,添加sheet,并写入数据,生成折线图
因为需要将返回的结果都写进表格,并输出折线图。但因为有较多不同的分类,故而需要创建不同的sheet表,废话不多说,直接上代码:import openpyxl, osfrom openpyxl.chart import LineChart, Referenceclass WriteData(): def __init__(self, title, x_title): self.title = title self.x_title = x_title