如何使用 python 的 openpyxl 在 excel 上绘制日期格式的折线图

how to draw line chart with date fomat on excel using openpyxl of python

我使用 openpyxl

在 excel 上画了一个折线图

在excel sheet:

     date     value
"2015-05-01" | 0.1
"2015-05-02" | 0.2
"2015-05-03" | 0.3
"2015-05-04" | 0.4

但它给出了日期数据的整数格式,如“45612”...我如何绘制日期格式的折线图? (日期为x轴,数值为y轴)

使用这样的东西:chart.x_axis.number_format = 'yyyy-mm-dd'