php - PHPExcel two collors in one cell -


i want add more 1 color cell on phpexcel.

now i'm adding cell this:

$objphpexcel->setactivesheetindex(0)->setcellvalue("a1", $text); 

found this, doesn't work:

$richtext = new phpexcel_richtext(); 

probably easy, didn't find.

take @ section 4.6.37 of developer documentation describing rich text, , 05featuredemo.inc.php example in /tests demonstrates using rich text in cell

$objrichtext = new phpexcel_richtext(); $run1 = $objrichtext->createtextrun('red '); $run1->getfont()->setcolor( new phpexcel_style_color( phpexcel_style_color::color_red ) );  $run2 = $objrichtext->createtextrun('blue '); $run2->getfont()->setcolor( new phpexcel_style_color( phpexcel_style_color::color_blue ) );  $objphpexcel->setactivesheetindex(0)->setcellvalue("a1", $objrichtext); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -