2
0
forked from Wavyzz/dolibarr

Mise a jour librairie php_writeexcel en 0.3.0 (la prcdente ne fonctionne pas en php5)

This commit is contained in:
Laurent Destailleur
2006-01-27 20:52:08 +00:00
parent c5462977e4
commit 08615d2bbc
27 changed files with 3430 additions and 1316 deletions

View File

@@ -5,7 +5,7 @@ set_time_limit(10);
require_once "class.writeexcel_workbook.inc.php";
require_once "class.writeexcel_worksheet.inc.php";
$fname = tempnam("/tmp", "merge2.xls");
$fname = tempnam("/tmp", "simple.xls");
$workbook = &new writeexcel_workbook($fname);
$worksheet = &$workbook->addworksheet();
@@ -22,16 +22,17 @@ $worksheet->write(3, 0, 3.00000); # Writes 3
$worksheet->write(4, 0, 3.00001); # Writes 3.00001
$worksheet->write(5, 0, 3.14159); # TeX revision no.?
# Formulas are not yet supported
//$worksheet->write(7, 0, '=A3 + A6');
//$worksheet->write(8, 0, '=IF(A5>3,"Yes", "No")');
# Write two formulas
$worksheet->write(7, 0, '=A3 + A6');
$worksheet->write(8, 0, '=IF(A5>3,"Yes", "No")');
# Write a hyperlink
$worksheet->write(7, 0, 'http://www.php.net/');
$worksheet->write(10, 0, 'http://www.php.net/');
$workbook->close();
header("Content-Type: application/x-msexcel");
header("Content-Type: application/x-msexcel; name=\"example-simple.xls\"");
header("Content-Disposition: inline; filename=\"example-simple.xls\"");
$fh=fopen($fname, "rb");
fpassthru($fh);
unlink($fname);