title: Creating table in PhpWord
body: <p>Everything is working fine, but I am have really tried to make a table in phpword without white spacing with below the text inside the table. Please help me out forming this situation.</p>
  
  <p>This is my code....</p>
  
  <pre><code>$phpWord = new \PhpOffice\PhpWord\PhpWord();
  
  $phpWord-&gt;getCompatibility()-&gt;setOoxmlVersion(14);
  $phpWord-&gt;getCompatibility()-&gt;setOoxmlVersion(15);
  
  $targetFile = "./global/uploads/";
  $filename = $news['CompanyDetails']['QuotationCode'].' Quotation For '.$news['CompanyDetails']['CompanyName'].'.docx';
  
  $section = $phpWord-&gt;addSection();
  $section-&gt;getStyle()-&gt;setBreakType('continuous');
  $header = $section-&gt;addHeader();
  $header-&gt;headerTop(10);
  
  
  
  $section-&gt;addImage(base_url('images/qoutlogo.jpg'), array('align'=&gt;'center' ,'topMargin' =&gt; -5));
  
  $section-&gt;addTextBreak(-5);
  $center = $phpWord-&gt;addParagraphStyle('p2Style', array('align'=&gt;'center','marginTop' =&gt; 1));
  $section-&gt;addText('this is my name',array('bold' =&gt; true,'underline'=&gt;'single','name'=&gt;'TIMOTHYfont','size' =&gt; 14),$center);
  $section-&gt;addTextBreak(-.5);
  
  $section-&gt;addText('Tel:    00971-55-25553443 Fax: 00971-55- 2553443',array('name'=&gt;'Times New Roman','size' =&gt; 13),$center);
  $section-&gt;addTextBreak(-.5);
  $section-&gt;addText('Quotation',array('bold' =&gt; true,'underline'=&gt;'single','name'=&gt;'Times New Roman','size' =&gt; 16),$center);
  $section-&gt;addTextBreak(-.5);
  $tableStyle = array('borderSize' =&gt; 1, 'borderColor' =&gt; '999999', 'afterSpacing' =&gt; 0, 'Spacing'=&gt; 0, 'cellMargin'=&gt;0  );
  $styleCell = array('borderTopSize'=&gt;1 ,'borderTopColor' =&gt;'black','borderLeftSize'=&gt;1,'borderLeftColor' =&gt;'black','borderRightSize'=&gt;1,'borderRightColor'=&gt;'black','borderBottomSize' =&gt;1,'borderBottomColor'=&gt;'black' );
  $fontStyle = array('italic'=&gt; true, 'size'=&gt;11, 'name'=&gt;'Times New Roman','afterSpacing' =&gt; 0, 'Spacing'=&gt; 0, 'cellMargin'=&gt;0 );
  $TfontStyle = array('bold'=&gt;true, 'italic'=&gt; true, 'size'=&gt;11, 'name' =&gt; 'Times New Roman', 'afterSpacing' =&gt; 0, 'Spacing'=&gt; 0, 'cellMargin'=&gt;0);
  $cfontStyle = array('allCaps'=&gt;true,'italic'=&gt; true, 'size'=&gt;11, 'name' =&gt; 'Times New Roman','afterSpacing' =&gt; 0, 'Spacing'=&gt; 0, 'cellMargin'=&gt;0);
  $noSpace = array('textBottomSpacing' =&gt; -1);
  $table = $section-&gt;addTable('myOwnTableStyle',array('borderSize' =&gt; 1, 'borderColor' =&gt; '999999', 'afterSpacing' =&gt; 0, 'Spacing'=&gt; 0, 'cellMargin'=&gt;0  ));
  $table2 = $section-&gt;addTable('myOwnTableStyle');
  $table-&gt;addRow(-0.5, array('exactHeight' =&gt; -5));
  $countrystate = $news['CompanyDetails']['Country'].' - '.$news['CompanyDetails']['State'];
  $table-&gt;addCell(2500,$styleCell)-&gt;addText('Date',$TfontStyle);
  $table-&gt;addCell(6000,$styleCell)-&gt;addText($news['CompanyDetails']['Date'],$fontStyle);
  $table-&gt;addCell(1500,$styleCell)-&gt;addText('Cust. Ref',$TfontStyle);
  $table-&gt;addCell(2000,$styleCell)-&gt;addText($news['CompanyDetails']['Reference'],$fontStyle);
  $table-&gt;addRow();
  $table-&gt;addCell(2500,$styleCell)-&gt;addText('Company Name',$TfontStyle);
  $table-&gt;addCell(6000,$styleCell)-&gt;addText($news['CompanyDetails']['CompanyName'],$cfontStyle);
  $table-&gt;addCell(1500,$styleCell)-&gt;addText('Tel',$TfontStyle);
  $table-&gt;addCell(2000,$styleCell)-&gt;addText($news['CompanyDetails']['Tel'],$fontStyle);
  $table-&gt;addRow();
  $table-&gt;addCell(2500,$styleCell)-&gt;addText('Country',$TfontStyle);
  $table-&gt;addCell(6000,$styleCell)-&gt;addText($countrystate, $fontStyle);
  $table-&gt;addCell(1500,$styleCell)-&gt;addText('Fax',$TfontStyle);
  $table-&gt;addCell(2000,$styleCell)-&gt;addText($news['CompanyDetails']['Fex'],$fontStyle);
  $table-&gt;addRow();
  $table-&gt;addCell(2500,$styleCell)-&gt;addText('Attn.',$TfontStyle);
  $table-&gt;addCell(6000,$styleCell)-&gt;addText($news['CompanyDetails']['ContectPerson'].' '. $news['CompanyDetails']['Designation'].' '.$news['CompanyDetails']['MobileNum'],$fontStyle);
  $table-&gt;addCell(1500,$styleCell)-&gt;addText('Email',$TfontStyle);
  $table-&gt;addCell(2000,$styleCell)-&gt;addText($news['CompanyDetails']['Email'],$fontStyle);
  $table-&gt;addRow();
  $table-&gt;addCell(2500,$styleCell)-&gt;addText('Subject',$TfontStyle);
  $table-&gt;addCell(6000,$styleCell)-&gt;addText($news['CompanyDetails']['Subject'],$fontStyle);
  $table-&gt;addCell(1500,$styleCell)-&gt;addText('From',$TfontStyle);
  $table-&gt;addCell(2000,$styleCell)-&gt;addText($news['CompanyDetails']['From'],$fontStyle);
  $table-&gt;addRow();
  $table-&gt;addCell(2500,$styleCell)-&gt;addText('Quotation No.',$TfontStyle);
  $table-&gt;addCell(6000,$styleCell)-&gt;addText($news['CompanyDetails']['QuotationNum'],$fontStyle);
  $table-&gt;addCell(1500,$styleCell)-&gt;addText('pages',$TfontStyle);
  $table-&gt;addCell(2000,$styleCell)-&gt;addText($news['CompanyDetails']['Pages'],$fontStyle);
  
  $section-&gt;addTextBreak(-1);
  </code></pre>
  
  <p>The result is this</p>
  
  <p><a href="https://i.stack.imgur.com/j5vBW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j5vBW.png" alt="enter image description here"></a></p>
  
  <p>but I required Like this (without white spacing or padding)</p>
  
  <p><a href="https://i.stack.imgur.com/FrIOv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FrIOv.png" alt="enter image description here"></a></p>