[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/includes/php_writeexcel/ -> example-bigfile.php (source)

   1  <?php
   2  
   3  set_time_limit(300);
   4  
   5  require_once  "class.writeexcel_workbookbig.inc.php";
   6  require_once  "class.writeexcel_worksheet.inc.php";
   7  
   8  $fname = tempnam("/tmp", "bigfile.xls");
   9  $workbook = &new writeexcel_workbookbig($fname);
  10  $worksheet = &$workbook->addworksheet();
  11  
  12  $worksheet->set_column(0, 50, 18);
  13  
  14  for ($col=0;$col<50;$col++) {
  15      for ($row=0;$row<6000;$row++) {
  16          $worksheet->write($row, $col, "ROW:$row COL:$col");
  17      }
  18  }
  19  
  20  $workbook->close();
  21  
  22  header("Content-Type: application/x-msexcel");
  23  $fh=fopen($fname, "rb");
  24  fpassthru($fh);
  25  unlink($fname);
  26  
  27  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics