title: maatwebsite Laravel excel merge same cells
body: <p>I try to use maatwebsite Laravel excel 2.1 to replace my old phpexcel script.</p>
  
  <p>With php excel, I query my bdd and loop inside.</p>
  
  <p>Each line of data as his own data + parents data so two or more line can have same value.</p>
  
  <p>So I loop through each data and write the value row by row. If parents values are the same as before, I merge the cell.</p>
  
  <p>At the end, I have merge all cells that have the same values.</p>
  
  <p>How can I do something like this on laravel-excel ??</p>
  
  <p>At the moment I gather all the data inside an array and use this code to export :</p>
  
  <pre><code>        Excel::load('excel\recap.xls', function($excel) use($array) {
  
          $excel-&gt;sheet('Copro', function($sheet) use($array) {
  
              $sheet-&gt;fromArray($array, null, 'A9', false);
              foreach ($sheet as $row) {
                  $sheet-&gt;setCellValue($row, 'some value');
              }
          });
  
      })-&gt;export('xls');
  </code></pre>
  
  <p>For example, $array can be like this :</p>
  
  <pre><code>array:2 [
    0 =&gt; array:8 [
      "Batiment" =&gt; "Unique"
      "N° du lot" =&gt; 7
      "Étage" =&gt; "1e étage"
      "Fraction" =&gt; "Parking 0.35"
      "Surface" =&gt; "11.500"
      "Coefficient" =&gt; "0.350"
      "Surface pondérée" =&gt; "4.025"
      "Quote-part" =&gt; "635.961"
    ]
    1 =&gt; array:8 [
      "Batiment" =&gt; "Unique"
      "N° du lot" =&gt; 8
      "Étage" =&gt; "1e étage"
      "Fraction" =&gt; "Principal"
      "Surface" =&gt; "65.850"
      "Coefficient" =&gt; "0.903"
      "Surface pondérée" =&gt; "59.265"
      "Quote-part" =&gt; "9364.039"
    ]
  ]
  </code></pre>
  
  <p>So here I want to merge "Batiment" and "Etage" columns, but it can be else columns and for a lot of rows.</p>
  
  <p>Someone know how to do this ?</p>
  
  <p>Thank for your help.</p>