"Fossies" - the Fresh Open Source Software Archive 
Member "php_writeexcel-0.3.0/example-bigfile.php" (1 Nov 2005, 669 Bytes) of package /linux/www/old/php_writeexcel-0.3.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "example-bigfile.php" see the
Fossies "Dox" file reference documentation.
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; name=\"example-bigfile.xls\"");
23 header("Content-Disposition: inline; filename=\"example-bigfile.xls\"");
24 $fh=fopen($fname, "rb");
25 fpassthru($fh);
26 unlink($fname);
27
28 ?>