Advertisement
Guest User

Untitled

a guest
Apr 28th, 2010
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2.  
  3. foreach( $file_list as $file ) {
  4.  
  5.     $column = 'D';
  6.  
  7.     $book = PHPExcel_IOFactory::load( $folder . $file );
  8.  
  9.     $headings = array( 'Title1',
  10.                 'Title2',
  11.                 'Title3',
  12.                 'Title4',
  13.                 'Title5' );
  14.  
  15. ?>
  16.  
  17. <table class="results">
  18.  
  19.     <tbody>
  20.  
  21.         <tr>
  22.  
  23.             <?php
  24.  
  25.             for( $i = 0; $i <= 4; $i++ ) {
  26.  
  27.                 echo '<th colspan="2">' . $headings[ $i ] . '</th>' . "\n";
  28.  
  29.             }
  30.  
  31.             ?>
  32.  
  33.         </tr>
  34.  
  35.         <tr>
  36.  
  37.             <?php
  38.  
  39.             for( $row = 106; $row <= 110; $row++ ) {
  40.  
  41.                 echo '<td colspan="2">' . round( $book->getActiveSheet()->getCell( $column . $row )->getCalculatedValue(), 1 ) . '</td>' . "\n";
  42.  
  43.             }
  44.  
  45.             ?>
  46.  
  47.         </tr>
  48.  
  49.     </tbody>
  50.  
  51. </table>
  52.  
  53. <?php
  54.  
  55. }
  56.  
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement