title: How to close excel file in php-excel-reader
body: <p>I am reading two excel file, using php-excel-reader (<a href="https://code.google.com/p/php-excel-reader/downloads/list" rel="nofollow">From this)</a> </p>
  
  <p>After reading two files of 1st row, I am comparing it. If they are same then I am appending contain of on file to other. To write the file I am using <a href="http://www.vijayjoshi.org/2009/12/15/how-to-create-excel-files-in-php/" rel="nofollow">this</a></p>
  
  <p>Now for doing this I want to close one file, but that function is not available in  php-excel-reader </p>
  
  <p>here is my code</p>
  
  <pre><code>compare file
  
  {
  
  $data = new Spreadsheet_Excel_Reader($filepath);
  
  $data1 = new Spreadsheet_Excel_Reader($destinationfilepath);
  
  }
  
  unset($data);
  
  unset($data1);
  
  
  if($flag==0)
  {
  
  $excel = new ExcelWriter($destinationfilepath); 
  
  // read the source file
  
   $finalarray= array();
  
  for($m=1;$m&lt;$sourcefilerowcount;$m++)
  
      { 
  
             $charvalue='A';
  
               $temprow=$m+1;
  
                for($n=0;$n&lt;$destinationcolnum;$n++)
          {
  
              $data = new Spreadsheet_Excel_Reader($filepath);
  
                              $finalarray[$n]=$data-&gt;val($temprow,$charvalue);
  
                              $charvalue++;
  
                      }
  
               print_r($finalarray)."&lt;br/&gt;";
  
       $excel-&gt;writeLine($finalarray);
    }
  </code></pre>