Skip to content
Discussion options

You must be logged in to vote

Then you need one rich text object that has two runs, one with the name and the styling, the second run with the age and no styling; and you write that rich text object to the cell... you're trying to concatenate a rich text object with plain text (which will result in a standard PHP string of plain text) and then write that to the cell
A Excel cell can't contain both a plain text string and a rich text object, it can contain either plain text or rich text

But, a rich text object can contain a mixture of styled text and unstyled text

$richText = new RichText();
$payable = $richText->createTextRun($Data[$i]->Name);
$payable->getFont()->setBold(true);
$payable->getFont()->setColor(new Color(…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Yosi096
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by oleibman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants