Documentation and Examples index
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@88581 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
f65dfa951e
commit
af6d270947
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DAVERAGE</h3>
|
||||
<h1>DAVERAGE</h1>
|
||||
<h2>Returns the average of selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example </h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DCOUNT</h3>
|
||||
<h1>DCOUNT</h1>
|
||||
<h2>Counts the cells that contain numbers in a database.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example </h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DMAX</h3>
|
||||
<h1>DMAX</h1>
|
||||
<h2>Returns the maximum value from selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example </h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DMIN</h3>
|
||||
<h1>DMIN</h1>
|
||||
<h2>Returns the minimum value from selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DSTDEV</h3>
|
||||
<h1>DSTDEV</h1>
|
||||
<h2>Estimates the standard deviation based on a sample of selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DSTDEVP</h3>
|
||||
<h1>DSTDEVP</h1>
|
||||
<h2>Calculates the standard deviation based on the entire population of selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DVAR</h3>
|
||||
<h1>DVAR</h1>
|
||||
<h2>Estimates variance based on a sample from selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Database Formulae</h2>
|
||||
<h3>DVARP</h3>
|
||||
<h1>DVARP</h1>
|
||||
<h2>Calculates variance based on the entire population of selected database entries,</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Data/Time Formulae</h2>
|
||||
<h3>DATE</h3>
|
||||
<h1>DATE</h1>
|
||||
<h2>Returns the serial number of a particular date.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Data/Time Formulae</h2>
|
||||
<h3>DATEVALUE</h3>
|
||||
<h1>DATEVALUE</h1>
|
||||
<h2>Converts a date in the form of text to a serial number.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Data/Time Formulae</h2>
|
||||
<h3>TIME</h3>
|
||||
<h1>TIME</h1>
|
||||
<h2>Returns the serial number of a particular time.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -16,15 +16,14 @@ date_default_timezone_set('Europe/London');
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Calculation Example</h1>
|
||||
<h2>Data/Time Formulae</h2>
|
||||
<h3>TIMEVALUE</h3>
|
||||
<h1>TIMEVALUE</h1>
|
||||
<h2>Converts a time in the form of text to a serial number.</h2>
|
||||
<?php
|
||||
|
||||
/** Include path **/
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
|
||||
|
||||
/** PHPExcel_IOFactory */
|
||||
/** Include PHPExcel */
|
||||
include 'PHPExcel.php';
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<title>PHPExcel Calculation Function Examples</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
echo '<h1>PHPExcel Calculation Function Examples</h1>';
|
||||
|
||||
$exampleTypeList = glob('./*',GLOB_ONLYDIR);
|
||||
|
||||
foreach($exampleTypeList as $exampleType) {
|
||||
|
||||
echo '<h2>' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Function Examples</h2>';
|
||||
|
||||
$exampleList = glob('./'.$exampleType.'/*.php');
|
||||
|
||||
foreach($exampleList as $exampleFile) {
|
||||
$fileData = file_get_contents($exampleFile);
|
||||
|
||||
$h1Pattern = '#<h1>(.*?)</h1>#';
|
||||
$h2Pattern = '#<h2>(.*?)</h2>#';
|
||||
|
||||
if (preg_match($h1Pattern, $fileData, $out)) {
|
||||
$h1Text = $out[1];
|
||||
$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
|
||||
|
||||
echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
|
||||
if ($h2Text > '') {
|
||||
echo $h2Text,'<br />';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -10,7 +10,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Reader Example #15</h1>
|
||||
<h1>PHPExcel Reader Example #14</h1>
|
||||
<h2>Reading a Large CSV file in "Chunks" to split across multiple Worksheets</h2>
|
||||
<?php
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ date_default_timezone_set('Europe/London');
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<title>PHPExcel Reader Example #08</title>
|
||||
<title>PHPExcel Reader Example #17</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>PHPExcel Reader Example #08</h1>
|
||||
<h1>PHPExcel Reader Example #17</h1>
|
||||
<h2>Simple File Reader Loading Several Named WorkSheets</h2>
|
||||
<?php
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ $exampleTypeList = glob('./*',GLOB_ONLYDIR);
|
|||
|
||||
foreach($exampleTypeList as $exampleType) {
|
||||
|
||||
echo '<h1>PHPExcel '.pathinfo($exampleType,PATHINFO_BASENAME).' Examples</h1>';
|
||||
echo '<h1>PHPExcel ' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Examples</h1>';
|
||||
|
||||
$exampleList = glob('./'.$exampleType.'/*.php');
|
||||
|
||||
|
@ -36,7 +36,8 @@ foreach($exampleTypeList as $exampleType) {
|
|||
$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
|
||||
|
||||
echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
|
||||
if ($h2Text > '') {
|
||||
if (($h2Text > '') &&
|
||||
(pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) {
|
||||
echo $h2Text,'<br />';
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue