PHPExcel formula border thickness issue
<p>When I try to to set a medium border around a cell, it will not display properly (to be seen in the picture). After editting the cell without changing its value (enter cell editting and pressing enter) it is displaying properly.
I'm using Excel 2007.</p>

<p><a href="http://i.stack.imgur.com/CI3bc.jpg" rel="nofollow">Screen before updating</a></p>

<pre><code>&lt;?php
include 'mySQLconnect.php';


/** Error reporting */
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/London');

if (PHP_SAPI == 'cli')
    die('This example should only be run from a Web Browser');

/** Include PHPExcel */
require_once dirname(__FILE__) . '/PHPExcel_1.8.0/Classes/PHPExcel.php';

// Create new PHPExcel object
$objPHPExcel = new PHPExcel();

$objPHPExcel-&gt;getActiveSheet();
$objPHPExcel-&gt;getActiveSheet()-&gt;setTitle('Sheet 1');

$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B2', '1');
$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B2', '1');
$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B3', '1');
$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B4', '1');

$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B6', '=SUM(B2:B4)');

$objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('B6')-&gt;applyFromArray(
    array('borders' =&gt; array(
        'bottom'    =&gt; array('style' =&gt;PHPExcel_Style_Border::BORDER_MEDIUM),
        'right'     =&gt; array('style' =&gt;PHPExcel_Style_Border::BORDER_MEDIUM),
        'left'      =&gt; array('style' =&gt;PHPExcel_Style_Border::BORDER_MEDIUM),
        'top'       =&gt; array('style' =&gt;PHPExcel_Style_Border::BORDER_MEDIUM)
    )
)
);

// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel-&gt;setActiveSheetIndex(0);

// Redirect output to a client’s web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="data.xls"');
header('Cache-Control: max-age=0');
// If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1');

// If you're serving to IE over SSL, then the following may be needed
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter-&gt;save('php://output');
exit;
?&gt;
</code></pre>

<p>Any help would be greatly appreciated.</p>