显示历史命令列表:history
import openpyxl
wb=openpyxl.Workbook()
sheet=wb.get_active_sheet()
for i in range (1,11):
sheet['A'+str(i)]=i
refObj=openpyxl.chart.Reference(sheet,1,1,1,10)
seriesObj=openpyxl.chart.Series(refObj,title='example chart')
chartObj=openpyxl.chart.BarChart()
chartObj.append(seriesObj)
sheet.add_chart(chartObj,'C5')
wb.save('examplechart.xlsx')
#openpyxl.charts.LineChart() 折线图
#openpyxl.charts.ScatterChart() 散点图
#openpyxl.charts.PieChart() 饼图