Bolding text with PHPExcel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Claus Mygind
    Contributor
    • Mar 2008
    • 571

    Bolding text with PHPExcel

    You can bold the entire content of a cell with this code

    Code:
    $objSheet->getStyle('A6')->getFont()->setBold(true)->setSize(10);
    But what I am looking for is a method to only bold some of the text in the cell.

    Something like this "not bold, bold, not bold"

    Is there a way to do that with PHPExcel
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    There is a RichText class is associated with PHPExcel. Using that you can bold text and set that object in the excel cell

    Comment

    Working...