title: PHPExcel outputting zeros as blank cells
body: <p>I'm building a WordPress plugin using PHPExcel to export reports of student attendance.  So far, I'm able to successfully take the array of student data (including attendance) and convert and download it as a spreadsheet.  Unfortunately, there's an odd bug: when a student has attended zero events, that cell on the spreadsheet is blank instead of showing a zero.  I'd prefer it come out with an actual zero, but I can't find a way to do that.  Here's my script:</p>
  
  <pre><code>error_reporting( E_ALL);
  ini_set( 'include_path', ini_get( 'include_path' ).';../Classes/' );
  
  include 'PHPExcel.php';
  include 'PHPExcel/Writer/Excel2007.php';
  
  $objPHPExcel = new PHPExcel();
  
  $objPHPExcel-&gt;setActiveSheetIndex( 0 );
  $objPHPExcel-&gt;getProperties()-&gt;setCreator( $user );
  $objPHPExcel-&gt;getProperties()-&gt;setLastModifiedBy( $user );
  $objPHPExcel-&gt;getProperties()-&gt;setTitle( $title );
  $objPHPExcel-&gt;getProperties()-&gt;setSubject( $title );
  $objPHPExcel-&gt;getProperties()-&gt;setDescription( $title );
  $objPHPExcel-&gt;getActiveSheet()-&gt;fromArray( $data, null, 'A1' );
  $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('A1:H1')-&gt;getFont()-&gt;setBold(true);
  
  $columns = array( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' );
  
  foreach ( $columns as $column ) {
  
      $objPHPExcel-&gt;getActiveSheet()-&gt;getColumnDimension($column)-&gt;setAutoSize(true);
  
  } // End $columns foreach
  
  $file_name = str_replace( ' ', '_', $title);
  
  if ( $_POST['type'] == 'spreadsheet' ) {
  
  header( 'Content-type: application/vnd.ms-excel' ); 
  header( 'Content-Disposition: attachment; filename="' . $file_name . '.xls"' );
  
  $objWriter = new PHPExcel_Writer_Excel2007( $objPHPExcel );
  $objWriter-&gt;save( 'php://output' );
  
  } 
  </code></pre>
  
  <p>$data contains the array of student info, which is structured like this:</p>
  
  <pre><code>Array (
      [0] =&gt; Array (
          [0] =&gt; First Name
          [1] =&gt; Last Name
          [2] =&gt; BU ID
          [3] =&gt; Barcode
          [4] =&gt; Major
          [5] =&gt; Class
          [6] =&gt; Seminars
          [7] =&gt; Showcases
      )
  
      [1] =&gt; Array (
          [first_name] =&gt; Seth
          [last_name] =&gt; Abel
          [buid] =&gt; B00385307
          [barcode] =&gt; 100324707
          [student_major] =&gt; CMM
          [class] =&gt; MBU2100
          [seminar] =&gt; 0
          [showcase] =&gt; 1
      )
  
      [2] =&gt; Array (
          [first_name] =&gt; Zachary
          [last_name] =&gt; Abend
          [buid] =&gt; B00373103
          [barcode] =&gt; 100291996
          [student_major] =&gt; MBU
          [class] =&gt; MBU2100
          [seminar] =&gt; 0
          [showcase] =&gt; 1
      )
  .
  .
  .
  )
  </code></pre>
  
  <p>As you can see is the example data, the those students have each attended 1 showcase, but zero seminars.  When this spreadsheet is downloaded and opened in Excel, the 1 shows up fine, but the seminar cells are blank.  Since I'm using the fromArray() function to populate the spreadsheet, is there something I should do to make those zeros appear properly?</p>