0

can I only bold certain word on phpExcel in a single cell ?

$excel = new PHPExcel();

$excel->setActiveSheetIndex(0);
$row = 5;

//MERGE title
$excel->getActiveSheet()->mergeCells('A1:P1');
$excel->getActiveSheet()
    ->setCellValue('A1', 'How to bold certain word on phpexcel
');

$excel->getActiveSheet()->getStyle('A1:P1')->applyFromArray(
      array(
        'font'=> array(
              'bold' => true,
              'size' => 14,
              'name' => 'Arial',
        ),
        'borders' => array(
          'allborders' => array(
            'style'=> PHPExcel_style_Border::BORDER_THIN
          )
        )
      )
  );

if I'm using the code above I will have all my words bold, can i only have the words 'word on' bold ?

blue blue
  • 25
  • 1
  • 6
  • 1
    https://stackoverflow.com/questions/8045056/phpexcel-how-to-make-part-of-the-text-bold maybe this helps – FatFreddy Jul 23 '18 at 11:56
  • 1
    Possible duplicate of [PHPExcel - How to make part of the text bold](https://stackoverflow.com/questions/8045056/phpexcel-how-to-make-part-of-the-text-bold) – Lelio Faieta Jul 23 '18 at 12:11

0 Answers0