openpyxl change one word's color in the same cell

后端 未结 1 1620

I am using openpyxl to write some data to excel sheet. In my script, I need to append data to the same cell and highlight with different color for the new added data. Currently,

相关标签:
1条回答
  • 2021-01-21 09:19

    This is unfortunately not possible with openpyxl. You'll have to use xlwt (for the legacy Excel format) or xlsxwriter (for the current Excel format).

    See https://foss.heptapod.net/openpyxl/openpyxl/-/issues/1503 for confirmation that openpyxl does not (and likely will never) support this functionality.

    For more information on xlwt see https://pypi.org/project/xlwt/.

    For more information on xlsxwriter see https://pypi.org/project/XlsxWriter/.

    0 讨论(0)
提交回复
热议问题