1

In this case, I don't want to highlight the entire cell. Instead I want to highlight individual characters in the cell automatically. Ultimately, I want to be able to compare two cells (one on top of the other) and highlight all of the different characters.

Currently, I'm using the xlsxwriter module to write to cells. I've already seen coloring cells in excel with pandas but it doesn't seem to be addressing my problem.

Anyone have any hints or useful functions that I could use to solve this problem?

Community
  • 1
  • 1
  • what version of excel are you using? – CodeCupboard May 18 '17 at 21:34
  • I'm using excel 15.33 for Mac OSX – Sondering Narcissist May 18 '17 at 22:03
  • 1
    You've mentioned pandas and XlsxWriter. Does that mean you're using XlsxWriter *through* pandas? I do not have experience doing that, but you can definitely achieve what you want using XlsxWriter directly. Investigate *rich strings*. Whether this level of control is available through pandas, I don't know. – John Y May 18 '17 at 22:24
  • Thanks @JohnY for that. I'm using pandas to open and read a file of data, and I'm using xlsxwriter to write data to a different file. Sorry for that confusion. Rich strings look promising. – Sondering Narcissist May 18 '17 at 22:44
  • Turns out that it's not possible to highlight individual elements in a cell using excel. The best that I could do was use write_rich_string() to change the color of the text when necessary. – Sondering Narcissist May 19 '17 at 21:31

0 Answers0