title: PHPExcel duplicate style only duplicate the first cell even when range of cell is given
body: <p>I'm trying to copy styles from a range of cells in a template file and paste it to another range of cells in another file and then save the resulting file.  I experimented on a small subset of my Excel file before I fully implemented it, but I found a strange result.</p>
  
  <p>Here is my code snippet...</p>
  
  <pre><code>include "../class/PHPExcel.php";
  include "../class/PHPExcel/IOFactory.php";
  include "../class/PHPExcel/Cell.php";
  
  $reader = PHPExcel_IOFactory::createReader('Excel2007');
  $frTemplate = $reader-&gt;load("document/Template/FR-001 Template.xlsx");
  $frTemplate-&gt;setActiveSheetIndex(0);
  $frTemplate-&gt;getActiveSheet()-&gt;setCellValueExplicitByColumnAndRow(3, 6, $year);
  
  //copy style
  $cellStyle = $frTemplate-&gt;getActiveSheet()-&gt;getStyle('E47:E49');
  $frTemplate-&gt;getActiveSheet()-&gt;duplicateStyle($cellStyle, 'E52:E54');
  
  //copy value
  $cellValues = $frTemplate-&gt;getActiveSheet()-&gt;rangeToArray('E47:E49');
  $frTemplate-&gt;getActiveSheet()-&gt;fromArray($cellValues, null,'E52');
  
  $writer = PHPExcel_IOFactory::createWriter($frTemplate, "Excel2007");
  $writer-&gt;save("document/Template/FR-001 2017.xlsx");
  
  echo "Done";
  </code></pre>
  
  <p>Here is an image of the copied Excel file...</p>
  
  <p><a href="https://i.stack.imgur.com/PY6Q4.jpg" rel="nofollow noreferrer">Copied File-Case 1</a></p>
  
  <p>And here is an image of the target file...</p>
  
  <p><a href="https://i.stack.imgur.com/UdpcQ.jpg" rel="nofollow noreferrer">Result-Case 1</a></p>
  
  <p>I'm trying to apply the code with another data, and I found that -</p>
  
  <ul>
  <li>"Merge cell" style cannot be copied</li>
  <li>When a range of cells is copied, the only style copied is the first cell (upper left)</li>
  </ul>
  
  <p>Sadly, I cannot post the evidence of the above case as my reputation is still very low (It is my first question in Stack Overflow!)</p>
  
  <p>So, can you please tell me what is wrong with my code? Thanks in advance.</p>