'Different formatting on a single cell. Python to Excel using OpenPyxl

As the title says I am trying to write into a cell in Excel using Python and the openpyxl library.

The cell in question has basically four parts all with different formatting. So: "New Assay: Date: 01/28/2022 @ 3:00pm"

New Assay is a different font and size 01/28/2022 in Italics 3:00 pm is in bold.

I have tried to format the cell, but it formats the whole cell and not specific parts.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source