php - How to use multiple style in PHPWord? -


actually using following code in phpword

$table->addcell(10500, $stylecell)->addtext('<span style="background-color:#003300;">test</span><span style="background-color:#00000;">dinesh</span>'); $table->addrow(); 

please solve problem...

you can achieve altering cell content coloring creating textrun , adding different colored parts separately:

$textrun = $table->addcell(10500, $stylecell)->addtextrun() $textrun->addtext(htmlspecialchars("test", ent_compat, 'utf-8'), array('color' => '003300')); $textrun->addtext(htmlspecialchars("dinesh", ent_compat, 'utf-8'), array('color' => '000000')); $table->addrow(); 

Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -