How to set up the Graphical Properties of Chart Area using openpyxl

℡╲_俬逩灬. 提交于 2019-12-02 04:54:53

This process may be helpful guidance to find an answer.

  1. Open a new excel spreadsheet and create a chart of interest with default settings. Save this with filename "default-chart-saved-by-excel.xlsx".
  2. Now modify the chart by changing the background color to purple (hex code 'AA00AA'). Save this with filename "redBG-chart-saved-by-excel.xlsx" and close excel.
  3. Open the default excel file using a zip program (7zip or similar) and extract the xl > charts > chart1.xml file to your working folder. Rename it to "default-chart-saved-by-excel.xml" Repeat for the "redBG" case.
  4. Open both of the xml files with an XML editor of choice (some web browsers work well) and look for the chunk of xml code that has changed by searching for the purple hex code 'AA00AA' That chunk is what you want openpyxl to target.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!