title: Read MS Excel file using PHPExcel and transform data to build some senteces
body: <p>I need some help here since I don't get the idea. I'm reading a XLS file using PHPExcel as follow:</p>
  
  <pre><code>include 'Classes/PHPExcel/IOFactory.php';
  
  $inputFileName = 'precios.xls';
  
  //  Read your Excel workbook
  try {
      $inputFileType = PHPExcel_IOFactory::identify($inputFileName);
      $objReader = PHPExcel_IOFactory::createReader($inputFileType);
      $objPHPExcel = $objReader-&gt;load($inputFileName);
  } catch (Exception $e) {
      die('Error loading file "' . pathinfo($inputFileName, PATHINFO_BASENAME) . '": ' . $e-&gt;getMessage());
  }
  
  $rowIterator = $objPHPExcel-&gt;getActiveSheet()-&gt;getRowIterator();
  $array_data = array();
  foreach ($rowIterator as $row) {
      $cellIterator = $row-&gt;getCellIterator();
      $cellIterator-&gt;setIterateOnlyExistingCells(false);
      $rowIndex = $row-&gt;getRowIndex();
      $array_data[$rowIndex] = array('A' =&gt; '', 'B' =&gt; '', 'C' =&gt; '', 'D' =&gt; '', 'E' =&gt; '', 'F' =&gt; '', 'G' =&gt; '');
  
      foreach ($cellIterator as $cell) {
          if ('A' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          } else if ('B' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          } else if ('C' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          } else if ('D' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          } else if ('E' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          } else if ('F' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          } else if ('G' == $cell-&gt;getColumn()) {
              $array_data[$rowIndex][$cell-&gt;getColumn()] = $cell-&gt;getCalculatedValue();
          }
      }
  }
  
  echo '&lt;pre&gt;';
  
  print_r($array_data);
  </code></pre>
  
  <p>That returns something like:</p>
  
  <pre><code>Array
  (
  [1] =&gt; Array
      (
          [A] =&gt; ALGARROBO
          [B] =&gt; 10800
          [C] =&gt; 10800
          [D] =&gt; 16450
          [E] =&gt; 19150
          [F] =&gt; 23100
          [G] =&gt; 23100
      )
  
  [2] =&gt; Array
      (
          [A] =&gt; ALTO HOSPICIO
          [B] =&gt; 27950
          [C] =&gt; 27950
          [D] =&gt; 39950
          [E] =&gt; 43900
          [F] =&gt; 55550
          [G] =&gt; 55550
      )
  
  [3] =&gt; Array
      (
          [A] =&gt; ANCUD
          [B] =&gt; 7000
          [C] =&gt; 7000
          [D] =&gt; 10700
          [E] =&gt; 13250
          [F] =&gt; 15800
          [G] =&gt; 15800
      )
  
  [4] =&gt; Array
      (
          [A] =&gt; ANDACOLLO
          [B] =&gt; 12950
          [C] =&gt; 12950
          [D] =&gt; 18850
          [E] =&gt; 21650
          [F] =&gt; 26500
          [G] =&gt; 26500
      )
  );
  </code></pre>
  
  <p>What I need to do from here and don't get the idea is to transform that result into this:</p>
  
  <pre><code>1:10.800,6:10.800,12:16.450,18:19.150,24:23.100,30:23.100 // this is an example for first array
  1:B,6:C,12:D,18:E,24:F,30:G // the same thing using arrays keys
  </code></pre>
  
  <p>Also notice the numeric "." for values, can any give me some ideas or some sample code to get this done?</p>