from openpyxl.chart import Series, LineChart, Referencefrom openpyxl import Workbook, load_workbook 最終效果圖如下: