xlwings
xlwings copied to clipboard
Underlining a portion of the text in a cell
In Excel VBA, if I have text in the cell referenced by the range object r, I can do:
r.Characters(1, 10).Font.Underline = True
to underline just the first 10 characters of the text.
r.api.Characters(1, 10).Font.Underline = True
produces the error:
builtins.TypeError: 'Characters' object is not callable
I have tried many many different approaches but cannot figure out how to underline partial text with xlwings.
Can someone please explain how to do this.
Maybe trying r.characters[1:10].api.Font.Underline = True