1
我正在使用openpyxl來修改我的xlsx數據,我創建了幾個線圖。我無法弄清楚如何將圖表上的標記選項更改爲無。創建圖形時xlsx中的標記選項設置爲自動,因此我有很多點。openpyxl - 是否可以將線圖上的標記更改爲無
Tnaks for answers。
我正在使用openpyxl來修改我的xlsx數據,我創建了幾個線圖。我無法弄清楚如何將圖表上的標記選項更改爲無。創建圖形時xlsx中的標記選項設置爲自動,因此我有很多點。openpyxl - 是否可以將線圖上的標記更改爲無
Tnaks for answers。
這在openpyxl 2.3中是可行的。該文檔仍在工作中,但您可以完全訪問整個格式化API。不幸的是,這個API非常複雜。
代碼看起來像:
chart = LineChart()
# add some data
line = chart.series[0]
line.shapeProperties.line.noFill = True
line.marker.symbol = "circle"
見http://openpyxl.readthedocs.org/en/stable/charts/introduction.html得到一個開始(和退房更多的例子在2.3分支)。對於完全控制,您將不得不熟悉OOXML規範,並準備閱讀圖表的來源。