title: PHPExcel set border color of a cell
body: <p>How to set border color of a cell?
  I used this code, but it's not working:</p>
  
  <pre><code>$objPHPExcel-&gt;getActiveSheet()
                  -&gt;getStyle('A1')
                  -&gt;getBorders()
                  -&gt;getAllBorders()
                  -&gt;setBorderStyle(PHPExcel_Style_Border::BORDER_THIN)
                  -&gt;getColor()
                  -&gt;setRGB('DDDDDD');
  </code></pre>
  
  <blockquote>
    <p>I know <code>applyFromArray()</code> works fine. But I don't want to use it.</p>
  </blockquote>