title: Formatting a text in a table cell with PHPWord e.g. bold, font, size e.t.c
body: <p>I have the code snippet below</p>
  
  <pre><code>  //create a new word document
  
      $word= new PHPWord();
  
      //create potrait orientation
      $section=$word-&gt;createSection();   
  
  
      $table = $section-&gt;addTable();
      $word-&gt;addFontStyle('rStyle', array('bold'=&gt;true, 'italic'=&gt;true, 'size'=&gt;16));
      //header row
      $table-&gt;addRow(400, array('bgColor'=&gt;'dbdbdb'));
      $table-&gt;addCell(2000, array('bgColor'=&gt;'dbdbdb'))-&gt;addText('Cell 1','rStyle');
      $table-&gt;addCell(3500, array('bgColor'=&gt;'dbdbdb'))-&gt;addText('Cell 1');
      $table-&gt;addCell(1500, array('bgColor'=&gt;'dbdbdb'))-&gt;addText('Cell 1','rStyle');
      $table-&gt;addCell(2000, array('bgColor'=&gt;'dbdbdb'))-&gt;addText('Cell 1');       
  
      // Save File
      $objWriter = PHPWord_IOFactory::createWriter($word, 'Word2007');
      $objWriter-&gt;save('Text.docx');
      echo 'Text.docx created successfully';
  }
  </code></pre>
  
  <p>How can i add text formatting to a cell value to bold, italic, font-size etc, I have tried as shown above but it does not work</p>