How can I use Office Scripts to format specific parts of strings within Excel cells? For example, I want to make only a portion of the content bold.
Let's say my cell contains the text:
Cell content
I'd like to change it to this format:
Cell content
An answer from Copilot suggested using
cellRange.getFormat().getFont().setBold(true, { start: 0, end: 3 })
, but this won't work because the setBold
function only accepts one argument.