first commit

This commit is contained in:
aschwarz
2023-04-26 13:17:21 +02:00
commit 535741001e
1612 changed files with 820287 additions and 0 deletions

View File

@ -0,0 +1,90 @@
<?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 Examples</title>
</head>
<body>
<h1>DAVERAGE</h1>
<h2>Returns the average of selected database entries.</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The Average yield of Apple trees over 10\' in height');
$worksheet->setCellValue('B12', '=DAVERAGE(A4:E10,"Yield",A1:B2)');
$worksheet->setCellValue('A13', 'The Average age of all Apple and Pear trees in the orchard');
$worksheet->setCellValue('B13', '=DAVERAGE(A4:E10,3,A1:A3)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:B2',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DAVERAGE() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DAVERAGE() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,90 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The Number of Apple trees over 10\' in height');
$worksheet->setCellValue('B12', '=DCOUNT(A4:E10,"Yield",A1:B2)');
$worksheet->setCellValue('A13', 'The Number of Apple and Pear trees in the orchard');
$worksheet->setCellValue('B13', '=DCOUNT(A4:E10,3,A1:A3)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:B2',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DCOUNT() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DCOUNT() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,86 @@
<?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 Examples</title>
</head>
<body>
<h1>DGET</h1>
<h2>Extracts a single value from a column of a list or database that matches conditions that you specify.</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The height of the Apple tree between 10\' and 16\' tall');
$worksheet->setCellValue('B12', '=DGET(A4:E10,"Height",A1:F2)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
echo 'ALL' . '<br /><br />';
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,89 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The tallest tree in the orchard');
$worksheet->setCellValue('B12', '=DMAX(A4:E10,"Height",A4:E10)');
$worksheet->setCellValue('A13', 'The Oldest apple tree in the orchard');
$worksheet->setCellValue('B13', '=DMAX(A4:E10,3,A1:A2)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
echo 'ALL' . '<br /><br />';
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,89 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The shortest tree in the orchard');
$worksheet->setCellValue('B12', '=DMIN(A4:E10,"Height",A4:E10)');
$worksheet->setCellValue('A13', 'The Youngest apple tree in the orchard');
$worksheet->setCellValue('B13', '=DMIN(A4:E10,3,A1:A2)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
echo 'ALL' . '<br /><br />';
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DMIN() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DMIN() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,87 @@
<?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 Examples</title>
</head>
<body>
<h1>DPRODUCT</h1>
<h2>Multiplies the values in a column of a list or database that match conditions that you specify.</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The product of the yields of all Apple trees over 10\' in the orchard');
$worksheet->setCellValue('B12', '=DPRODUCT(A4:E10,"Yield",A1:B2)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
echo 'ALL' . '<br /><br />';
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,90 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The estimated standard deviation in the yield of Apple and Pear trees');
$worksheet->setCellValue('B12', '=DSTDEV(A4:E10,"Yield",A1:A3)');
$worksheet->setCellValue('A13', 'The estimated standard deviation in height of Apple and Pear trees');
$worksheet->setCellValue('B13', '=DSTDEV(A4:E10,2,A1:A3)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DSTDEV() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DSTDEV() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,90 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The standard deviation in the yield of Apple and Pear trees');
$worksheet->setCellValue('B12', '=DSTDEVP(A4:E10,"Yield",A1:A3)');
$worksheet->setCellValue('A13', 'The standard deviation in height of Apple and Pear trees');
$worksheet->setCellValue('B13', '=DSTDEVP(A4:E10,2,A1:A3)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DSTDEVP() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DSTDEVP() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,90 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The estimated variance in the yield of Apple and Pear trees');
$worksheet->setCellValue('B12', '=DVAR(A4:E10,"Yield",A1:A3)');
$worksheet->setCellValue('A13', 'The estimated variance in height of Apple and Pear trees');
$worksheet->setCellValue('B13', '=DVAR(A4:E10,2,A1:A3)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DVAR() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DVAR() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,90 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL )
);
$worksheet->fromArray( $criteria, NULL, 'A1' );
$worksheet->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', 'The variance in the yield of Apple and Pear trees');
$worksheet->setCellValue('B12', '=DVARP(A4:E10,"Yield",A1:A3)');
$worksheet->setCellValue('A13', 'The variance in height of Apple and Pear trees');
$worksheet->setCellValue('B13', '=DVARP(A4:E10,2,A1:A3)');
echo '<hr />';
echo '<h4>Database</h4>';
$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
var_dump($databaseData);
echo '<hr />';
// Test the formulae
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A12")->getValue() .'<br />';
echo 'DVARP() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
echo '<h4>Criteria</h4>';
$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
var_dump($criteriaData);
echo $worksheet->getCell("A13")->getValue() .'<br />';
echo 'DVARP() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
?>
<body>
</html>

View File

@ -0,0 +1,83 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$testDates = array( array(2012,3,26), array(2012,2,29), array(2012,4,1), array(2012,12,25),
array(2012,10,31), array(2012,11,5), array(2012,1,1), array(2012,3,17),
array(2011,2,29), array(7,5,3), array(2012,13,1), array(2012,11,45),
array(2012,0,0), array(2012,1,0), array(2012,0,1),
array(2012,-2,2), array(2012,2,-2), array(2012,-2,-2),
);
$testDateCount = count($testDates);
$worksheet->fromArray($testDates,NULL,'A1',true);
for ($row = 1; $row <= $testDateCount; ++$row) {
$worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
$worksheet->setCellValue('E'.$row, '=D'.$row);
}
$worksheet->getStyle('E1:E'.$testDateCount)
->getNumberFormat()
->setFormatCode('yyyy-mmm-dd');
echo '<hr />';
// Test the formulae
?>
<table border="1" cellspacing="0">
<tr>
<th colspan="3">Date Value</th>
<th rowspan="2" valign="bottom">Formula</th>
<th rowspan="2" valign="bottom">Excel DateStamp</th>
<th rowspan="2" valign="bottom">Formatted DateStamp</th>
</tr>
<tr>
<th>Year</th>
<th>Month</th>
<th>Day</th>
<tr>
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
echo '</tr>';
}
?>
</table>

View File

@ -0,0 +1,76 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$testDates = array( '26 March 2012', '29 Feb 2012', 'April 1, 2012', '25/12/2012',
'2012-Oct-31', '5th November', 'January 1st', 'April 2012',
'17-03', '03-2012', '29 Feb 2011', '03-05-07',
'03-MAY-07', '03-13-07',
);
$testDateCount = count($testDates);
for($row = 1; $row <= $testDateCount; ++$row) {
$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
$worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
$worksheet->setCellValue('C'.$row, '=B'.$row);
}
$worksheet->getStyle('C1:C'.$testDateCount)
->getNumberFormat()
->setFormatCode('yyyy-mmm-dd');
echo '<hr />';
// Test the formulae
?>
<p><strong>Warning: </strong>The PHPExcel DATEVALUE() function accepts a wider range of date formats than MS Excel's DATEFORMAT() function.</p>
<table border="1" cellspacing="0">
<tr>
<th>Date String</th>
<th>Formula</th>
<th>Excel DateStamp</th>
<th>Formatted DateStamp</th>
</tr>
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
echo '</tr>';
}
?>
</table>

View File

@ -0,0 +1,81 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$testDates = array( array(3,15), array(13,15), array(15,15,15), array(3,15,30),
array(15,15,15), array(5), array(9,15,0), array(9,15,-1),
array(13,-14,-15), array(0,0,-1)
);
$testDateCount = count($testDates);
$worksheet->fromArray($testDates,NULL,'A1',true);
for ($row = 1; $row <= $testDateCount; ++$row) {
$worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
$worksheet->setCellValue('E'.$row, '=D'.$row);
}
$worksheet->getStyle('E1:E'.$testDateCount)
->getNumberFormat()
->setFormatCode('hh:mm:ss');
echo '<hr />';
// Test the formulae
?>
<table border="1" cellspacing="0">
<tr>
<th colspan="3">Date Value</th>
<th rowspan="2" valign="bottom">Formula</th>
<th rowspan="2" valign="bottom">Excel TimeStamp</th>
<th rowspan="2" valign="bottom">Formatted TimeStamp</th>
</tr>
<tr>
<th>Hour</th>
<th>Minute</th>
<th>Second</th>
<tr>
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
echo '</tr>';
}
?>
</table>

View File

@ -0,0 +1,72 @@
<?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 Examples</title>
</head>
<body>
<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/');
/** Include PHPExcel */
include 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->getActiveSheet();
// Add some data
$testDates = array( '3:15', '13:15', '15:15:15', '3:15 AM', '3:15 PM', '5PM', '9:15AM', '13:15AM'
);
$testDateCount = count($testDates);
for($row = 1; $row <= $testDateCount; ++$row) {
$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
$worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
$worksheet->setCellValue('C'.$row, '=B'.$row);
}
$worksheet->getStyle('C1:C'.$testDateCount)
->getNumberFormat()
->setFormatCode('hh:mm:ss');
echo '<hr />';
// Test the formulae
?>
<table border="1" cellspacing="0">
<tr>
<th>Time String</th>
<th>Formula</th>
<th>Excel TimeStamp</th>
<th>Formatted TimeStamp</th>
</tr>
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
echo '</tr>';
}
?>
</table>

View File

@ -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>

View File

@ -0,0 +1,42 @@
<?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 Reader Example #01</title>
</head>
<body>
<h1>PHPExcel Reader Example #01</h1>
<h2>Simple File Reader using PHPExcel_IOFactory::load()</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />';
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -0,0 +1,50 @@
<?php
error_reporting(E_ALL);
set_time_limit(0);
date_default_timezone_set('Europe/London');
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PHPExcel Reader Example #02</title>
</head>
<body>
<h1>PHPExcel Reader Example #02</h1>
<h2>Simple File Reader using a Specified Reader</h2>
<?php
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using PHPExcel_Reader_Excel5<br />';
$objReader = new PHPExcel_Reader_Excel5();
// $objReader = new PHPExcel_Reader_Excel2007();
// $objReader = new PHPExcel_Reader_Excel2003XML();
// $objReader = new PHPExcel_Reader_OOCalc();
// $objReader = new PHPExcel_Reader_SYLK();
// $objReader = new PHPExcel_Reader_Gnumeric();
// $objReader = new PHPExcel_Reader_CSV();
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -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 Reader Example #03</title>
</head>
<body>
<h1>PHPExcel Reader Example #03</h1>
<h2>Simple File Reader using the PHPExcel_IOFactory to Return a Reader</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'SYLK';
// $inputFileType = 'Gnumeric';
// $inputFileType = 'CSV';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -0,0 +1,47 @@
<?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 Reader Example #04</title>
</head>
<body>
<h1>PHPExcel Reader Example #04</h1>
<h2>Simple File Reader using the PHPExcel_IOFactory to Identify a Reader to Use</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileName = './sampleData/example1.xls';
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
echo 'File ',pathinfo($inputFileName,PATHINFO_BASENAME),' has been identified as an ',$inputFileType,' file<br />';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with the identified reader type<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -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 Reader Example #05</title>
</head>
<body>
<h1>PHPExcel Reader Example #05</h1>
<h2>Simple File Reader using the "Read Data Only" Option</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Turning Formatting off for Load<br />';
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -0,0 +1,54 @@
<?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 Reader Example #06</title>
</head>
<body>
<h1>PHPExcel Reader Example #06</h1>
<h2>Simple File Reader Loading All WorkSheets</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Loading all WorkSheets<br />';
$objReader->setLoadAllSheets();
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
$loadedSheetNames = $objPHPExcel->getSheetNames();
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo $sheetIndex,' -> ',$loadedSheetName,'<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,55 @@
<?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 Reader Example #07</title>
</head>
<body>
<h1>PHPExcel Reader Example #07</h1>
<h2>Simple File Reader Loading a Single Named WorkSheet</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #2';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Loading Sheet "',$sheetname,'" only<br />';
$objReader->setLoadSheetsOnly($sheetname);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
$loadedSheetNames = $objPHPExcel->getSheetNames();
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo $sheetIndex,' -> ',$loadedSheetName,'<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,55 @@
<?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 Reader Example #08</title>
</head>
<body>
<h1>PHPExcel Reader Example #08</h1>
<h2>Simple File Reader Loading Several Named WorkSheets</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetnames = array('Data Sheet #1','Data Sheet #3');
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Loading Sheet',((count($sheetnames) == 1) ? '' : 's'),' "',implode('" and "',$sheetnames),'" only<br />';
$objReader->setLoadSheetsOnly($sheetnames);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
$loadedSheetNames = $objPHPExcel->getSheetNames();
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo $sheetIndex,' -> ',$loadedSheetName,'<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,71 @@
<?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 Reader Example #09</title>
</head>
<body>
<h1>PHPExcel Reader Example #09</h1>
<h2>Simple File Reader Using a Read Filter</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #3';
class MyReadFilter implements PHPExcel_Reader_IReadFilter
{
public function readCell($column, $row, $worksheetName = '') {
// Read rows 1 to 7 and columns A to E only
if ($row >= 1 && $row <= 7) {
if (in_array($column,range('A','E'))) {
return true;
}
}
return false;
}
}
$filterSubset = new MyReadFilter();
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Loading Sheet "',$sheetname,'" only<br />';
$objReader->setLoadSheetsOnly($sheetname);
echo 'Loading Sheet using filter<br />';
$objReader->setReadFilter($filterSubset);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -0,0 +1,82 @@
<?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 Reader Example #10</title>
</head>
<body>
<h1>PHPExcel Reader Example #10</h1>
<h2>Simple File Reader Using a Configurable Read Filter</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #3';
class MyReadFilter implements PHPExcel_Reader_IReadFilter
{
private $_startRow = 0;
private $_endRow = 0;
private $_columns = array();
public function __construct($startRow, $endRow, $columns) {
$this->_startRow = $startRow;
$this->_endRow = $endRow;
$this->_columns = $columns;
}
public function readCell($column, $row, $worksheetName = '') {
if ($row >= $this->_startRow && $row <= $this->_endRow) {
if (in_array($column,$this->_columns)) {
return true;
}
}
return false;
}
}
$filterSubset = new MyReadFilter(9,15,range('G','K'));
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Loading Sheet "',$sheetname,'" only<br />';
$objReader->setLoadSheetsOnly($sheetname);
echo 'Loading Sheet using configurable filter<br />';
$objReader->setReadFilter($filterSubset);
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -0,0 +1,91 @@
<?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 Reader Example #11</title>
</head>
<body>
<h1>PHPExcel Reader Example #11</h1>
<h2>Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 1)</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example2.xls';
/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */
class chunkReadFilter implements PHPExcel_Reader_IReadFilter
{
private $_startRow = 0;
private $_endRow = 0;
/** We expect a list of the rows that we want to read to be passed into the constructor */
public function __construct($startRow, $chunkSize) {
$this->_startRow = $startRow;
$this->_endRow = $startRow + $chunkSize;
}
public function readCell($column, $row, $worksheetName = '') {
// Only read the heading row, and the rows that were configured in the constructor
if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) {
return true;
}
return false;
}
}
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo '<hr />';
/** Define how many rows we want for each "chunk" **/
$chunkSize = 20;
/** Loop to read our worksheet in "chunk size" blocks **/
for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />';
/** Create a new Instance of our Read Filter, passing in the limits on which rows we want to read **/
$chunkFilter = new chunkReadFilter($startRow,$chunkSize);
/** Tell the Reader that we want to use the new Read Filter that we've just Instantiated **/
$objReader->setReadFilter($chunkFilter);
/** Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
// Do some processing here
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
echo '<br /><br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,94 @@
<?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 Reader Example #12</title>
</head>
<body>
<h1>PHPExcel Reader Example #12</h1>
<h2>Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 2)</h2>
<?php
/** Set Include path to point at the PHPExcel Classes folder **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** Include PHPExcel_IOFactory **/
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example2.xls';
/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */
class chunkReadFilter implements PHPExcel_Reader_IReadFilter
{
private $_startRow = 0;
private $_endRow = 0;
/** Set the list of rows that we want to read */
public function setRows($startRow, $chunkSize) {
$this->_startRow = $startRow;
$this->_endRow = $startRow + $chunkSize;
}
public function readCell($column, $row, $worksheetName = '') {
// Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow
if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) {
return true;
}
return false;
}
}
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo '<hr />';
/** Define how many rows we want to read for each "chunk" **/
$chunkSize = 20;
/** Create a new Instance of our Read Filter **/
$chunkFilter = new chunkReadFilter();
/** Tell the Reader that we want to use the Read Filter that we've Instantiated **/
$objReader->setReadFilter($chunkFilter);
/** Loop to read our worksheet in "chunk size" blocks **/
for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />';
/** Tell the Read Filter, the limits on which rows we want to read this iteration **/
$chunkFilter->setRows($startRow,$chunkSize);
/** Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
// Do some processing here
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
echo '<br /><br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,60 @@
<?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 Reader Example #13</title>
</head>
<body>
<h1>PHPExcel Reader Example #13</h1>
<h2>Simple File Reader for Multiple CSV Files</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'CSV';
$inputFileNames = array('./sampleData/example1.csv','./sampleData/example2.csv');
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$inputFileName = array_shift($inputFileNames);
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' into WorkSheet #1 using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objPHPExcel = $objReader->load($inputFileName);
$objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));
foreach($inputFileNames as $sheet => $inputFileName) {
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' into WorkSheet #',($sheet+2),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader->setSheetIndex($sheet+1);
$objReader->loadIntoExisting($inputFileName,$objPHPExcel);
$objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));
}
echo '<hr />';
echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
$loadedSheetNames = $objPHPExcel->getSheetNames();
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />';
$objPHPExcel->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
echo '<br /><br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,105 @@
<?php
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PHPExcel Reader Example #15</title>
</head>
<body>
<h1>PHPExcel Reader Example #14</h1>
<h2>Reading a Large CSV file in "Chunks" to split across multiple Worksheets</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'CSV';
$inputFileName = './sampleData/example2.csv';
/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */
class chunkReadFilter implements PHPExcel_Reader_IReadFilter
{
private $_startRow = 0;
private $_endRow = 0;
/** Set the list of rows that we want to read */
public function setRows($startRow, $chunkSize) {
$this->_startRow = $startRow;
$this->_endRow = $startRow + $chunkSize;
}
public function readCell($column, $row, $worksheetName = '') {
// Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow
if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) {
return true;
}
return false;
}
}
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo '<hr />';
/** Define how many rows we want to read for each "chunk" **/
$chunkSize = 100;
/** Create a new Instance of our Read Filter **/
$chunkFilter = new chunkReadFilter();
/** Tell the Reader that we want to use the Read Filter that we've Instantiated **/
/** and that we want to store it in contiguous rows/columns **/
$objReader->setReadFilter($chunkFilter)
->setContiguous(true);
/** Instantiate a new PHPExcel object manually **/
$objPHPExcel = new PHPExcel();
/** Set a sheet index **/
$sheet = 0;
/** Loop to read our worksheet in "chunk size" blocks **/
/** $startRow is set to 2 initially because we always read the headings in row #1 **/
for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
echo 'Loading WorkSheet #',($sheet+1),' using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />';
/** Tell the Read Filter, the limits on which rows we want to read this iteration **/
$chunkFilter->setRows($startRow,$chunkSize);
/** Increment the worksheet index pointer for the Reader **/
$objReader->setSheetIndex($sheet);
/** Load only the rows that match our filter into a new worksheet in the PHPExcel Object **/
$objReader->loadIntoExisting($inputFileName,$objPHPExcel);
/** Set the worksheet title (to reference the "sheet" of data that we've loaded) **/
/** and increment the sheet index as well **/
$objPHPExcel->getActiveSheet()->setTitle('Country Data #'.(++$sheet));
}
echo '<hr />';
echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
$loadedSheetNames = $objPHPExcel->getSheetNames();
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />';
$objPHPExcel->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,false,false,true);
var_dump($sheetData);
echo '<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,71 @@
<?php
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PHPExcel Reader Example #15</title>
</head>
<body>
<h1>PHPExcel Reader Example #15</h1>
<h2>Simple File Reader for Tab-Separated Value File using the Advanced Value Binder</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() );
$inputFileType = 'CSV';
$inputFileName = './sampleData/example1.tsv';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' into WorkSheet #1 using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader->setDelimiter("\t");
$objPHPExcel = $objReader->load($inputFileName);
$objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));
echo '<hr />';
echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
$loadedSheetNames = $objPHPExcel->getSheetNames();
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Formatted)</b><br />';
$objPHPExcel->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
echo '<br />';
}
echo '<hr />';
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Unformatted)</b><br />';
$objPHPExcel->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,false,true);
var_dump($sheetData);
echo '<br />';
}
echo '<hr />';
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Raw)</b><br />';
$objPHPExcel->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,false,false,true);
var_dump($sheetData);
echo '<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,46 @@
<?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 Reader Example #16</title>
</head>
<body>
<h1>PHPExcel Reader Example #16</h1>
<h2>Handling Loader Exceptions using Try/Catch</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileName = './sampleData/example_1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />';
try {
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
} catch(PHPExcel_Reader_Exception $e) {
die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage());
}
echo '<hr />';
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
?>
<body>
</html>

View File

@ -0,0 +1,52 @@
<?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 Reader Example #17</title>
</head>
<body>
<h1>PHPExcel Reader Example #17</h1>
<h2>Simple File Reader Loading Several Named WorkSheets</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/** Read the list of Worksheet Names from the Workbook file **/
echo 'Read the list of Worksheets in the WorkBook<br />';
$worksheetNames = $objReader->listWorksheetNames($inputFileName);
echo 'There are ',count($worksheetNames),' worksheet',((count($worksheetNames) == 1) ? '' : 's'),' in the workbook<br /><br />';
foreach($worksheetNames as $worksheetName) {
echo $worksheetName,'<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,50 @@
<?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 Reader Example #18</title>
</head>
<body>
<h1>PHPExcel Reader Example #18</h1>
<h2>Reading list of WorkSheets without loading entire file</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$worksheetNames = $objReader->listWorksheetNames($inputFileName);
echo '<h3>Worksheet Names</h3>';
echo '<ol>';
foreach ($worksheetNames as $worksheetName) {
echo '<li>', $worksheetName, '</li>';
}
echo '</ol>';
?>
<body>
</html>

View File

@ -0,0 +1,53 @@
<?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 Reader Example #19</title>
</head>
<body>
<h1>PHPExcel Reader Example #19</h1>
<h2>Reading WorkSheet information without loading entire file</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$worksheetData = $objReader->listWorksheetInfo($inputFileName);
echo '<h3>Worksheet Information</h3>';
echo '<ol>';
foreach ($worksheetData as $worksheet) {
echo '<li>', $worksheet['worksheetName'], '<br />';
echo 'Rows: ', $worksheet['totalRows'], ' Columns: ', $worksheet['totalColumns'], '<br />';
echo 'Cell Range: A1:', $worksheet['lastColumnLetter'], $worksheet['totalRows'];
echo '</li>';
}
echo '</ol>';
?>
<body>
</html>

View File

@ -0,0 +1,4 @@
First Name,Last Name,Nationality,Gender,Date of Birth,Time of Birth,Date/Time,PHP Coder,Sanity %Age
Mark,Baker,British,M,19-Dec-1960,01:30,=E2+F2,TRUE,32%
Toni,Baker,British,F,24-Nov-1950,20:00,=E3+F3,FALSE,95%
Rachel,Baker,British,F,7-Dec-1982,00:15,=E4+F4,FALSE,100%
1 First Name Last Name Nationality Gender Date of Birth Time of Birth Date/Time PHP Coder Sanity %Age
2 Mark Baker British M 19-Dec-1960 01:30 =E2+F2 TRUE 32%
3 Toni Baker British F 24-Nov-1950 20:00 =E3+F3 FALSE 95%
4 Rachel Baker British F 7-Dec-1982 00:15 =E4+F4 FALSE 100%

View File

@ -0,0 +1,4 @@
First Name Last Name Nationality Gender Date of Birth Time of Birth Date/Time PHP Coder Sanity %Age
Mark Baker British M 19-Dec-1960 01:30 =E2+F2 TRUE 32%
Toni Baker British F 24-Nov-1950 20:00 =E3+F3 FALSE 95%
Rachel Baker British F 7-Dec-1982 00:15 =E4+F4 FALSE 100%
1 First Name Last Name Nationality Gender Date of Birth Time of Birth Date/Time PHP Coder Sanity %Age
2 Mark Baker British M 19-Dec-1960 01:30 =E2+F2 TRUE 32%
3 Toni Baker British F 24-Nov-1950 20:00 =E3+F3 FALSE 95%
4 Rachel Baker British F 7-Dec-1982 00:15 =E4+F4 FALSE 100%

View File

@ -0,0 +1,223 @@
"City","Country","Latitude","Longitude"
"Kabul","Afghanistan",34.528455,69.171703
"Tirane","Albania",41.33,19.82
"Algiers","Algeria",36.752887,3.042048
"Pago Pago","American Samoa",-14.27933,-170.700897
"Andorra la Vella","Andorra",42.507531,1.521816
"Luanda","Angola",-8.838333,13.234444
"Buenos Aires","Argentina",-34.608417,-58.373161
"Yerevan","Armenia",40.183333,44.516667
"Oranjestad","Aruba",12.52458,-70.026459
"Canberra","Australia",-35.3075,149.124417
"Vienna","Austria",48.208333,16.373056
"Baku","Azerbaijan",40.379571,49.891233
"Nassau","Bahamas",25.06,-77.345
"Manama","Bahrain",26.216667,50.583333
"Dhaka","Bangladesh",23.709921,90.407143
"Bridgetown","Barbados",13.096111,-59.608333
"Minsk","Belarus",53.9,27.566667
"Brussels","Belgium",50.846281,4.354727
"Belmopan","Belize",17.251389,-88.766944
"Thimphu","Bhutan",27.466667,89.641667
"La Paz","Bolivia",-16.49901,-68.146248
"Sarajevo","Bosnia and Herzegovina",43.8476,18.3564
"Gaborone","Botswana",-24.65411,25.908739
"Brasilia","Brazil",-15.780148,-47.92917
"Road Town","British Virgin Islands",18.433333,-64.616667
"Bandar Seri Begawan","Brunei Darussalam",4.9431,114.9425
"Sofia","Bulgaria",42.697626,23.322284
"Ouagadougou","Burkina Faso",12.364637,-1.533864
"Bujumbura","Burundi",-3.361378,29.359878
"Phnom Penh","Cambodia",11.55,104.916667
"Yaounde","Cameroon",3.866667,11.516667
"Ottawa","Canada",45.423494,-75.697933
"Praia","Cape Verde",14.920833,-23.508333
"George Town","Cayman Islands",19.286932,-81.367439
"Bangui","Central African Republic",4.361698,18.555975
"N'Djamena","Chad",12.104797,15.044506
"Santiago","Chile",-33.42536,-70.566466
"Beijing","China",39.904667,116.408198
"Bogota","Colombia",4.647302,-74.096268
"Moroni","Comoros",-11.717216,43.247315
"Brazzaville","Congo",-4.266667,15.283333
"San Jose","Costa Rica",9.933333,-84.083333
"Yamoussoukro","Cote d'Ivoire",6.816667,-5.283333
"Zagreb","Croatia",45.814912,15.978515
"Havana","Cuba",23.133333,-82.366667
"Nicosia","Cyprus",35.166667,33.366667
"Prague","Czech Republic",50.087811,14.42046
"Kinshasa","Congo",-4.325,15.322222
"Copenhagen","Denmark",55.676294,12.568116
"Djibouti","Djibouti",11.588,43.145
"Roseau","Dominica",15.301389,-61.388333
"Santo Domingo","Dominican Republic",18.5,-69.983333
"Dili","East Timor",-8.566667,125.566667
"Quito","Ecuador",-0.229498,-78.524277
"Cairo","Egypt",30.064742,31.249509
"San Salvador","El Salvador",13.69,-89.190003
"Malabo","Equatorial Guinea",3.75,8.783333
"Asmara","Eritrea",15.33236,38.92617
"Tallinn","Estonia",59.438862,24.754472
"Addis Ababa","Ethiopia",9.022736,38.746799
"Stanley","Falkland Islands",-51.700981,-57.84919
"Torshavn","Faroe Islands",62.017707,-6.771879
"Suva","Fiji",-18.1416,178.4419
"Helsinki","Finland",60.169813,24.93824
"Paris","France",48.856667,2.350987
"Cayenne","French Guiana",4.9227,-52.3269
"Papeete","French Polynesia",-17.535021,-149.569595
"Libreville","Gabon",0.390841,9.453644
"Banjul","Gambia",13.453056,-16.5775
"T'bilisi","Georgia",41.716667,44.783333
"Berlin","Germany",52.523405,13.4114
"Accra","Ghana",5.555717,-0.196306
"Athens","Greece",37.97918,23.716647
"Nuuk","Greenland",64.18362,-51.721407
"Basse-Terre","Guadeloupe",15.998503,-61.72202
"Guatemala","Guatemala",14.641389,-90.513056
"St. Peter Port","Guernsey",49.458858,-2.534752
"Conakry","Guinea",9.537029,-13.67847
"Bissau","Guinea-Bissau",11.866667,-15.6
"Georgetown","Guyana",6.804611,-58.154831
"Port-au-Prince","Haiti",18.539269,-72.336408
"Tegucigalpa","Honduras",14.082054,-87.206285
"Budapest","Hungary",47.498406,19.040758
"Reykjavik","Iceland",64.135338,-21.89521
"New Delhi","India",28.635308,77.22496
"Jakarta","Indonesia",-6.211544,106.845172
"Tehran","Iran",35.696216,51.422945
"Baghdad","Iraq",33.3157,44.3922
"Dublin","Ireland",53.344104,-6.267494
"Jerusalem","Israel",31.7857,35.2007
"Rome","Italy",41.895466,12.482324
"Kingston","Jamaica",17.992731,-76.792009
"St. Helier","Jersey",49.190278,-2.108611
"Amman","Jordan",31.956578,35.945695
"Astana","Kazakhstan",51.10,71.30
"Nairobi","Kenya",-01.17,36.48
"Tarawa","Kiribati",01.30,173.00
"Seoul","South Korea",37.31,126.58
"Kuwait City","Kuwait",29.30,48.00
"Bishkek","Kyrgyzstan",42.54,74.46
"Riga","Latvia",56.53,24.08
"Beirut","Lebanon",33.53,35.31
"Maseru","Lesotho",-29.18,27.30
"Monrovia","Liberia",06.18,-10.47
"Vaduz","Liechtenstein",47.08,09.31
"Vilnius","Lithuania",54.38,25.19
"Luxembourg","Luxembourg",49.37,06.09
"Antananarivo","Madagascar",-18.55,47.31
"Lilongwe","Malawi",-14.00,33.48
"Kuala Lumpur","Malaysia",03.09,101.41
"Male","Maldives",04.00,73.28
"Bamako","Mali",12.34,-07.55
"Valletta","Malta",35.54,14.31
"Fort-de-France","Martinique",14.36,-61.02
"Nouakchott","Mauritania",-20.10,57.30
"Mamoudzou","Mayotte",-12.48,45.14
"Mexico City","Mexico",19.20,-99.10
"Palikir","Micronesia",06.55,158.09
"Chisinau","Moldova",47.02,28.50
"Maputo","Mozambique",-25.58,32.32
"Yangon","Myanmar",16.45,96.20
"Windhoek","Namibia",-22.35,17.04
"Kathmandu","Nepal",27.45,85.20
"Amsterdam","Netherlands",52.23,04.54
"Willemstad","Netherlands Antilles",12.05,-69.00
"Noumea","New Caledonia",-22.17,166.30
"Wellington","New Zealand",-41.19,174.46
"Managua","Nicaragua",12.06,-86.20
"Niamey","Niger",13.27,02.06
"Abuja","Nigeria",09.05,07.32
"Kingston","Norfolk Island",-45.20,168.43
"Saipan","Northern Mariana Islands",15.12,145.45
"Oslo","Norway",59.55,10.45
"Masqat","Oman",23.37,58.36
"Islamabad","Pakistan",33.40,73.10
"Koror","Palau",07.20,134.28
"Panama City","Panama",09.00,-79.25
"Port Moresby","Papua New Guinea",-09.24,147.08
"Asuncion","Paraguay",-25.10,-57.30
"Lima","Peru",-12.00,-77.00
"Manila","Philippines",14.40,121.03
"Warsaw","Poland",52.13,21.00
"Lisbon","Portugal",38.42,-09.10
"San Juan","Puerto Rico",18.28,-66.07
"Doha","Qatar",25.15,51.35
"Bucuresti","Romania",44.27,26.10
"Moskva","Russian Federation",55.45,37.35
"Kigali","Rawanda",-01.59,30.04
"Basseterre","Saint Kitts and Nevis",17.17,-62.43
"Castries","Saint Lucia",14.02,-60.58
"Saint-Pierre","Saint Pierre and Miquelon",46.46,-56.12
"Apia","Samoa",-13.50,-171.50
"San Marino","San Marino",43.55,12.30
"Sao Tome","Sao Tome and Principe",00.10,06.39
"Riyadh","Saudi Arabia",24.41,46.42
"Dakar","Senegal",14.34,-17.29
"Freetown","Sierra Leone",08.30,-13.17
"Bratislava","Slovakia",48.10,17.07
"Ljubljana","Slovenia",46.04,14.33
"Honiara","Solomon Islands",-09.27,159.57
"Mogadishu","Somalia",02.02,45.25
"Pretoria","South Africa",-25.44,28.12
"Madrid","Spain",40.25,-03.45
"Khartoum","Sudan",15.31,32.35
"Paramaribo","Suriname",05.50,-55.10
"Mbabane","Swaziland",-26.18,31.06
"Stockholm","Sweden",59.20,18.03
"Bern","Switzerland",46.57,07.28
"Damascus","Syrian Arab Republic",33.30,36.18
"Dushanbe","Tajikistan",38.33,68.48
"Bangkok","Thailand",13.45,100.35
"Lome","Togo",06.09,01.20
"Nuku'alofa","Tonga",-21.10,-174.00
"Tunis","Tunisia",36.50,10.11
"Ankara","Turkey",39.57,32.54
"Ashgabat","Turkmenistan",38.00,57.50
"Funafuti","Tuvalu",-08.31,179.13
"Kampala","Uganda",00.20,32.30
"Kiev","Ukraine",50.30,30.28
"Abu Dhabi","United Arab Emirates",24.28,54.22
"London","United Kingdom",51.36,-00.05
"Dodoma","Tanzania",-06.08,35.45
"Washington DC","United States of America",39.91,-77.02
"Montevideo","Uruguay",-34.50,-56.11
"Tashkent","Uzbekistan",41.20,69.10
"Port-Vila","Vanuatu",-17.45,168.18
"Caracas","Venezuela",10.30,-66.55
"Hanoi","Viet Nam",21.05,105.55
"Belgrade","Yugoslavia",44.50,20.37
"Lusaka","Zambia",-15.28,28.16
"Harare","Zimbabwe",-17.43,31.02
"St. John's","Antigua and Barbuda",17.08,-61.50
"Porto Novo","Benin",06.30,02.47
"Hamilton","Bermuda"","32.18,-64.48
"Avarua","Cook Islands",-21.12,-159.46
"St. George's","Grenada",12.04,-61.44
"Aga<EFBFBD>a","Guam",13.28,144.45
"Victoria","Hong Kong",22.16,114.13
"Tokyo","Japan",35.40,139.45
"Pyongyang","North Korea",39.00,125.47
"Vientiane","Laos",17.59,102.38
"Tripoli","Libya",32.54,013.11
"Skopje","Macedonia",42.00,021.28
"Majuro","Marshall Islands",07.05,171.08
"Port Louis","Mauritius",-20.10,57.30
"Monaco","Monaco",43.44,007.25
"Ulan Bator","Mongolia",47.54,106.52
"Plymouth","Montserrat",16.44,-62.14
"Rabat","Morocco",34.02,-06.51
"Alofi","Niue",-14.27,-178.05
"Saint-Denis","R<EFBFBD>union",-20.52,55.27
"Victoria","Seychelles",-04.38,55.28
"Singapore","Singapore",01.18,103.50
"Colombo","Sri Lanka",06.55,79.52
"Kingstown","St Vincent and the Grenadines",13.12,-61.14
"Taipei","Taiwan",25.50,121.32
"Port-of-Spain","Trinidad and Tobago",10.38,-61.31
"Cockburn Harbour","Turks and Caicos Islands",21.30,-71.30
"Charlotte Amalie","US Virgin Islands",18.22,-64.56
"Vatican City","Vatican State",41.54,12.27
"La<EFBFBD>youne","Western Sahara",27.10,-13.11
"San'a","Yemen",15.24,44.14
Can't render this file because it contains an unexpected character in line 195 and column 23.

View File

@ -0,0 +1,93 @@
<?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 Reading WorkBook Data Example #01</title>
</head>
<body>
<h1>PHPExcel Reading WorkBook Data Example #01</h1>
<h2>Read the WorkBook Properties</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
$inputFileName = './sampleData/example1.xls';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/** Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
/** Read the document's creator property **/
$creator = $objPHPExcel->getProperties()->getCreator();
echo '<b>Document Creator: </b>',$creator,'<br />';
/** Read the Date when the workbook was created (as a PHP timestamp value) **/
$creationDatestamp = $objPHPExcel->getProperties()->getCreated();
/** Format the date and time using the standard PHP date() function **/
$creationDate = date('l, d<\s\up>S</\s\up> F Y',$creationDatestamp);
$creationTime = date('g:i A',$creationDatestamp);
echo '<b>Created On: </b>',$creationDate,' at ',$creationTime,'<br />';
/** Read the name of the last person to modify this workbook **/
$modifiedBy = $objPHPExcel->getProperties()->getLastModifiedBy();
echo '<b>Last Modified By: </b>',$modifiedBy,'<br />';
/** Read the Date when the workbook was last modified (as a PHP timestamp value) **/
$modifiedDatestamp = $objPHPExcel->getProperties()->getModified();
/** Format the date and time using the standard PHP date() function **/
$modifiedDate = date('l, d<\s\up>S</\s\up> F Y',$modifiedDatestamp);
$modifiedTime = date('g:i A',$modifiedDatestamp);
echo '<b>Last Modified On: </b>',$modifiedDate,' at ',$modifiedTime,'<br />';
/** Read the workbook title property **/
$workbookTitle = $objPHPExcel->getProperties()->getTitle();
echo '<b>Title: </b>',$workbookTitle,'<br />';
/** Read the workbook description property **/
$description = $objPHPExcel->getProperties()->getDescription();
echo '<b>Description: </b>',$description,'<br />';
/** Read the workbook subject property **/
$subject = $objPHPExcel->getProperties()->getSubject();
echo '<b>Subject: </b>',$subject,'<br />';
/** Read the workbook keywords property **/
$keywords = $objPHPExcel->getProperties()->getKeywords();
echo '<b>Keywords: </b>',$keywords,'<br />';
/** Read the workbook category property **/
$category = $objPHPExcel->getProperties()->getCategory();
echo '<b>Category: </b>',$category,'<br />';
/** Read the workbook company property **/
$company = $objPHPExcel->getProperties()->getCompany();
echo '<b>Company: </b>',$company,'<br />';
/** Read the workbook manager property **/
$manager = $objPHPExcel->getProperties()->getManager();
echo '<b>Manager: </b>',$manager,'<br />';
?>
<body>
</html>

View File

@ -0,0 +1,52 @@
<?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 Reading WorkBook Data Example #02</title>
</head>
<body>
<h1>PHPExcel Reading WorkBook Data Example #02</h1>
<h2>Read a list of Custom Properties for a WorkBook</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel2007';
$inputFileName = './sampleData/example1.xlsx';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/** Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
/** Read an array list of any custom properties for this document **/
$customPropertyList = $objPHPExcel->getProperties()->getCustomProperties();
echo '<b>Custom Property names: </b><br />';
foreach($customPropertyList as $customPropertyName) {
echo $customPropertyName,'<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,80 @@
<?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 Reading WorkBook Data Example #03</title>
</head>
<body>
<h1>PHPExcel Reading WorkBook Data Example #03</h1>
<h2>Read Custom Property Values for a WorkBook</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel2007';
$inputFileName = './sampleData/example1.xlsx';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/** Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
/** Read an array list of any custom properties for this document **/
$customPropertyList = $objPHPExcel->getProperties()->getCustomProperties();
echo '<b>Custom Properties: </b><br />';
/** Loop through the list of custom properties **/
foreach($customPropertyList as $customPropertyName) {
echo '<b>',$customPropertyName,': </b>';
/** Retrieve the property value **/
$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName);
/** Retrieve the property type **/
$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customPropertyName);
/** Manipulate properties as appropriate for display purposes **/
switch($propertyType) {
case 'i' : // integer
$propertyType = 'integer number';
break;
case 'f' : // float
$propertyType = 'floating point number';
break;
case 's' : // string
$propertyType = 'string';
break;
case 'd' : // date
$propertyValue = date('l, d<\s\up>S</\s\up> F Y g:i A',$propertyValue);
$propertyType = 'date';
break;
case 'b' : // boolean
$propertyValue = ($propertyValue) ? 'TRUE' : 'FALSE';
$propertyType = 'boolean';
break;
}
echo $propertyValue,' (',$propertyType,')<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,55 @@
<?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 Reading WorkBook Data Example #04</title>
</head>
<body>
<h1>PHPExcel Reading WorkBook Data Example #04</h1>
<h2>Get a List of the Worksheets in a WorkBook</h2>
<?php
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
$inputFileName = './sampleData/example2.xls';
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/** Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
echo '<hr />';
echo 'Reading the number of Worksheets in the WorkBook<br />';
/** Use the PHPExcel object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */
$sheetCount = $objPHPExcel->getSheetCount();
echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />';
echo 'Reading the names of Worksheets in the WorkBook<br />';
/** Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */
$sheetNames = $objPHPExcel->getSheetNames();
foreach($sheetNames as $sheetIndex => $sheetName) {
echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />';
}
?>
<body>
</html>

View File

@ -0,0 +1,50 @@
<?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 Examples</title>
</head>
<body>
<?php
$exampleTypeList = glob('./*',GLOB_ONLYDIR);
foreach($exampleTypeList as $exampleType) {
echo '<h1>PHPExcel ' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Examples</h1>';
$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 > '') &&
(pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) {
echo $h2Text,'<br />';
}
}
}
}
?>
<body>
</html>

View File

@ -0,0 +1,377 @@
CATEGORY_CUBE
CUBEKPIMEMBER *** Not yet Implemented
CUBEMEMBER *** Not yet Implemented
CUBEMEMBERPROPERTY *** Not yet Implemented
CUBERANKEDMEMBER *** Not yet Implemented
CUBESET *** Not yet Implemented
CUBESETCOUNT *** Not yet Implemented
CUBEVALUE *** Not yet Implemented
CATEGORY_DATABASE
DAVERAGE PHPExcel_Calculation_Database::DAVERAGE
DCOUNT PHPExcel_Calculation_Database::DCOUNT
DCOUNTA PHPExcel_Calculation_Database::DCOUNTA
DGET PHPExcel_Calculation_Database::DGET
DMAX PHPExcel_Calculation_Database::DMAX
DMIN PHPExcel_Calculation_Database::DMIN
DPRODUCT PHPExcel_Calculation_Database::DPRODUCT
DSTDEV PHPExcel_Calculation_Database::DSTDEV
DSTDEVP PHPExcel_Calculation_Database::DSTDEVP
DSUM PHPExcel_Calculation_Database::DSUM
DVAR PHPExcel_Calculation_Database::DVAR
DVARP PHPExcel_Calculation_Database::DVARP
CATEGORY_DATE_AND_TIME
DATE PHPExcel_Calculation_DateTime::DATE
DATEDIF PHPExcel_Calculation_DateTime::DATEDIF
DATEVALUE PHPExcel_Calculation_DateTime::DATEVALUE
DAY PHPExcel_Calculation_DateTime::DAYOFMONTH
DAYS360 PHPExcel_Calculation_DateTime::DAYS360
EDATE PHPExcel_Calculation_DateTime::EDATE
EOMONTH PHPExcel_Calculation_DateTime::EOMONTH
HOUR PHPExcel_Calculation_DateTime::HOUROFDAY
MINUTE PHPExcel_Calculation_DateTime::MINUTEOFHOUR
MONTH PHPExcel_Calculation_DateTime::MONTHOFYEAR
NETWORKDAYS PHPExcel_Calculation_DateTime::NETWORKDAYS
NOW PHPExcel_Calculation_DateTime::DATETIMENOW
SECOND PHPExcel_Calculation_DateTime::SECONDOFMINUTE
TIME PHPExcel_Calculation_DateTime::TIME
TIMEVALUE PHPExcel_Calculation_DateTime::TIMEVALUE
TODAY PHPExcel_Calculation_DateTime::DATENOW
WEEKDAY PHPExcel_Calculation_DateTime::DAYOFWEEK
WEEKNUM PHPExcel_Calculation_DateTime::WEEKOFYEAR
WORKDAY PHPExcel_Calculation_DateTime::WORKDAY
YEAR PHPExcel_Calculation_DateTime::YEAR
YEARFRAC PHPExcel_Calculation_DateTime::YEARFRAC
CATEGORY_ENGINEERING
BESSELI PHPExcel_Calculation_Engineering::BESSELI
BESSELJ PHPExcel_Calculation_Engineering::BESSELJ
BESSELK PHPExcel_Calculation_Engineering::BESSELK
BESSELY PHPExcel_Calculation_Engineering::BESSELY
BIN2DEC PHPExcel_Calculation_Engineering::BINTODEC
BIN2HEX PHPExcel_Calculation_Engineering::BINTOHEX
BIN2OCT PHPExcel_Calculation_Engineering::BINTOOCT
COMPLEX PHPExcel_Calculation_Engineering::COMPLEX
CONVERT PHPExcel_Calculation_Engineering::CONVERTUOM
DEC2BIN PHPExcel_Calculation_Engineering::DECTOBIN
DEC2HEX PHPExcel_Calculation_Engineering::DECTOHEX
DEC2OCT PHPExcel_Calculation_Engineering::DECTOOCT
DELTA PHPExcel_Calculation_Engineering::DELTA
ERF PHPExcel_Calculation_Engineering::ERF
ERFC PHPExcel_Calculation_Engineering::ERFC
GESTEP PHPExcel_Calculation_Engineering::GESTEP
HEX2BIN PHPExcel_Calculation_Engineering::HEXTOBIN
HEX2DEC PHPExcel_Calculation_Engineering::HEXTODEC
HEX2OCT PHPExcel_Calculation_Engineering::HEXTOOCT
IMABS PHPExcel_Calculation_Engineering::IMABS
IMAGINARY PHPExcel_Calculation_Engineering::IMAGINARY
IMARGUMENT PHPExcel_Calculation_Engineering::IMARGUMENT
IMCONJUGATE PHPExcel_Calculation_Engineering::IMCONJUGATE
IMCOS PHPExcel_Calculation_Engineering::IMCOS
IMDIV PHPExcel_Calculation_Engineering::IMDIV
IMEXP PHPExcel_Calculation_Engineering::IMEXP
IMLN PHPExcel_Calculation_Engineering::IMLN
IMLOG10 PHPExcel_Calculation_Engineering::IMLOG10
IMLOG2 PHPExcel_Calculation_Engineering::IMLOG2
IMPOWER PHPExcel_Calculation_Engineering::IMPOWER
IMPRODUCT PHPExcel_Calculation_Engineering::IMPRODUCT
IMREAL PHPExcel_Calculation_Engineering::IMREAL
IMSIN PHPExcel_Calculation_Engineering::IMSIN
IMSQRT PHPExcel_Calculation_Engineering::IMSQRT
IMSUB PHPExcel_Calculation_Engineering::IMSUB
IMSUM PHPExcel_Calculation_Engineering::IMSUM
OCT2BIN PHPExcel_Calculation_Engineering::OCTTOBIN
OCT2DEC PHPExcel_Calculation_Engineering::OCTTODEC
OCT2HEX PHPExcel_Calculation_Engineering::OCTTOHEX
CATEGORY_FINANCIAL
ACCRINT PHPExcel_Calculation_Financial::ACCRINT
ACCRINTM PHPExcel_Calculation_Financial::ACCRINTM
AMORDEGRC PHPExcel_Calculation_Financial::AMORDEGRC
AMORLINC PHPExcel_Calculation_Financial::AMORLINC
COUPDAYBS PHPExcel_Calculation_Financial::COUPDAYBS
COUPDAYS PHPExcel_Calculation_Financial::COUPDAYS
COUPDAYSNC PHPExcel_Calculation_Financial::COUPDAYSNC
COUPNCD PHPExcel_Calculation_Financial::COUPNCD
COUPNUM PHPExcel_Calculation_Financial::COUPNUM
COUPPCD PHPExcel_Calculation_Financial::COUPPCD
CUMIPMT PHPExcel_Calculation_Financial::CUMIPMT
CUMPRINC PHPExcel_Calculation_Financial::CUMPRINC
DB PHPExcel_Calculation_Financial::DB
DDB PHPExcel_Calculation_Financial::DDB
DISC PHPExcel_Calculation_Financial::DISC
DOLLARDE PHPExcel_Calculation_Financial::DOLLARDE
DOLLARFR PHPExcel_Calculation_Financial::DOLLARFR
DURATION *** Not yet Implemented
EFFECT PHPExcel_Calculation_Financial::EFFECT
FV PHPExcel_Calculation_Financial::FV
FVSCHEDULE PHPExcel_Calculation_Financial::FVSCHEDULE
INTRATE PHPExcel_Calculation_Financial::INTRATE
IPMT PHPExcel_Calculation_Financial::IPMT
IRR PHPExcel_Calculation_Financial::IRR
ISPMT PHPExcel_Calculation_Financial::ISPMT
MDURATION *** Not yet Implemented
MIRR PHPExcel_Calculation_Financial::MIRR
NOMINAL PHPExcel_Calculation_Financial::NOMINAL
NPER PHPExcel_Calculation_Financial::NPER
NPV PHPExcel_Calculation_Financial::NPV
ODDFPRICE *** Not yet Implemented
ODDFYIELD *** Not yet Implemented
ODDLPRICE *** Not yet Implemented
ODDLYIELD *** Not yet Implemented
PMT PHPExcel_Calculation_Financial::PMT
PPMT PHPExcel_Calculation_Financial::PPMT
PRICE PHPExcel_Calculation_Financial::PRICE
PRICEDISC PHPExcel_Calculation_Financial::PRICEDISC
PRICEMAT PHPExcel_Calculation_Financial::PRICEMAT
PV PHPExcel_Calculation_Financial::PV
RATE PHPExcel_Calculation_Financial::RATE
RECEIVED PHPExcel_Calculation_Financial::RECEIVED
SLN PHPExcel_Calculation_Financial::SLN
SYD PHPExcel_Calculation_Financial::SYD
TBILLEQ PHPExcel_Calculation_Financial::TBILLEQ
TBILLPRICE PHPExcel_Calculation_Financial::TBILLPRICE
TBILLYIELD PHPExcel_Calculation_Financial::TBILLYIELD
USDOLLAR *** Not yet Implemented
VDB *** Not yet Implemented
XIRR PHPExcel_Calculation_Financial::XIRR
XNPV PHPExcel_Calculation_Financial::XNPV
YIELD *** Not yet Implemented
YIELDDISC PHPExcel_Calculation_Financial::YIELDDISC
YIELDMAT PHPExcel_Calculation_Financial::YIELDMAT
CATEGORY_INFORMATION
CELL *** Not yet Implemented
ERROR.TYPE PHPExcel_Calculation_Functions::ERROR_TYPE
INFO *** Not yet Implemented
ISBLANK PHPExcel_Calculation_Functions::IS_BLANK
ISERR PHPExcel_Calculation_Functions::IS_ERR
ISERROR PHPExcel_Calculation_Functions::IS_ERROR
ISEVEN PHPExcel_Calculation_Functions::IS_EVEN
ISLOGICAL PHPExcel_Calculation_Functions::IS_LOGICAL
ISNA PHPExcel_Calculation_Functions::IS_NA
ISNONTEXT PHPExcel_Calculation_Functions::IS_NONTEXT
ISNUMBER PHPExcel_Calculation_Functions::IS_NUMBER
ISODD PHPExcel_Calculation_Functions::IS_ODD
ISREF *** Not yet Implemented
ISTEXT PHPExcel_Calculation_Functions::IS_TEXT
N PHPExcel_Calculation_Functions::N
NA PHPExcel_Calculation_Functions::NA
TYPE PHPExcel_Calculation_Functions::TYPE
VERSION PHPExcel_Calculation_Functions::VERSION
CATEGORY_LOGICAL
AND PHPExcel_Calculation_Logical::LOGICAL_AND
FALSE PHPExcel_Calculation_Logical::FALSE
IF PHPExcel_Calculation_Logical::STATEMENT_IF
IFERROR PHPExcel_Calculation_Logical::IFERROR
NOT PHPExcel_Calculation_Logical::NOT
OR PHPExcel_Calculation_Logical::LOGICAL_OR
TRUE PHPExcel_Calculation_Logical::TRUE
CATEGORY_LOOKUP_AND_REFERENCE
ADDRESS PHPExcel_Calculation_LookupRef::CELL_ADDRESS
AREAS *** Not yet Implemented
CHOOSE PHPExcel_Calculation_LookupRef::CHOOSE
COLUMN PHPExcel_Calculation_LookupRef::COLUMN
COLUMNS PHPExcel_Calculation_LookupRef::COLUMNS
GETPIVOTDATA *** Not yet Implemented
HLOOKUP PHPExcel_Calculation_LookupRef::HLOOKUP
HYPERLINK PHPExcel_Calculation_LookupRef::HYPERLINK
INDEX PHPExcel_Calculation_LookupRef::INDEX
INDIRECT PHPExcel_Calculation_LookupRef::INDIRECT
LOOKUP PHPExcel_Calculation_LookupRef::LOOKUP
MATCH PHPExcel_Calculation_LookupRef::MATCH
OFFSET PHPExcel_Calculation_LookupRef::OFFSET
ROW PHPExcel_Calculation_LookupRef::ROW
ROWS PHPExcel_Calculation_LookupRef::ROWS
RTD *** Not yet Implemented
TRANSPOSE PHPExcel_Calculation_LookupRef::TRANSPOSE
VLOOKUP PHPExcel_Calculation_LookupRef::VLOOKUP
CATEGORY_MATH_AND_TRIG
ABS abs
ACOS acos
ACOSH acosh
ASIN asin
ASINH asinh
ATAN atan
ATAN2 PHPExcel_Calculation_MathTrig::REVERSE_ATAN2
ATANH atanh
CEILING PHPExcel_Calculation_MathTrig::CEILING
COMBIN PHPExcel_Calculation_MathTrig::COMBIN
COS cos
COSH cosh
DEGREES rad2deg
EVEN PHPExcel_Calculation_MathTrig::EVEN
EXP exp
FACT PHPExcel_Calculation_MathTrig::FACT
FACTDOUBLE PHPExcel_Calculation_MathTrig::FACTDOUBLE
FLOOR PHPExcel_Calculation_MathTrig::FLOOR
GCD PHPExcel_Calculation_MathTrig::GCD
INT PHPExcel_Calculation_MathTrig::INT
LCM PHPExcel_Calculation_MathTrig::LCM
LN log
LOG PHPExcel_Calculation_MathTrig::LOG_BASE
LOG10 log10
MDETERM PHPExcel_Calculation_MathTrig::MDETERM
MINVERSE PHPExcel_Calculation_MathTrig::MINVERSE
MMULT PHPExcel_Calculation_MathTrig::MMULT
MOD PHPExcel_Calculation_MathTrig::MOD
MROUND PHPExcel_Calculation_MathTrig::MROUND
MULTINOMIAL PHPExcel_Calculation_MathTrig::MULTINOMIAL
ODD PHPExcel_Calculation_MathTrig::ODD
PI pi
POWER PHPExcel_Calculation_MathTrig::POWER
PRODUCT PHPExcel_Calculation_MathTrig::PRODUCT
QUOTIENT PHPExcel_Calculation_MathTrig::QUOTIENT
RADIANS deg2rad
RAND PHPExcel_Calculation_MathTrig::RAND
RANDBETWEEN PHPExcel_Calculation_MathTrig::RAND
ROMAN PHPExcel_Calculation_MathTrig::ROMAN
ROUND round
ROUNDDOWN PHPExcel_Calculation_MathTrig::ROUNDDOWN
ROUNDUP PHPExcel_Calculation_MathTrig::ROUNDUP
SERIESSUM PHPExcel_Calculation_MathTrig::SERIESSUM
SIGN PHPExcel_Calculation_MathTrig::SIGN
SIN sin
SINH sinh
SQRT sqrt
SQRTPI PHPExcel_Calculation_MathTrig::SQRTPI
SUBTOTAL PHPExcel_Calculation_MathTrig::SUBTOTAL
SUM PHPExcel_Calculation_MathTrig::SUM
SUMIF PHPExcel_Calculation_MathTrig::SUMIF
SUMIFS *** Not yet Implemented
SUMPRODUCT PHPExcel_Calculation_MathTrig::SUMPRODUCT
SUMSQ PHPExcel_Calculation_MathTrig::SUMSQ
SUMX2MY2 PHPExcel_Calculation_MathTrig::SUMX2MY2
SUMX2PY2 PHPExcel_Calculation_MathTrig::SUMX2PY2
SUMXMY2 PHPExcel_Calculation_MathTrig::SUMXMY2
TAN tan
TANH tanh
TRUNC PHPExcel_Calculation_MathTrig::TRUNC
CATEGORY_STATISTICAL
AVEDEV PHPExcel_Calculation_Statistical::AVEDEV
AVERAGE PHPExcel_Calculation_Statistical::AVERAGE
AVERAGEA PHPExcel_Calculation_Statistical::AVERAGEA
AVERAGEIF PHPExcel_Calculation_Statistical::AVERAGEIF
AVERAGEIFS *** Not yet Implemented
BETADIST PHPExcel_Calculation_Statistical::BETADIST
BETAINV PHPExcel_Calculation_Statistical::BETAINV
BINOMDIST PHPExcel_Calculation_Statistical::BINOMDIST
CHIDIST PHPExcel_Calculation_Statistical::CHIDIST
CHIINV PHPExcel_Calculation_Statistical::CHIINV
CHITEST *** Not yet Implemented
CONFIDENCE PHPExcel_Calculation_Statistical::CONFIDENCE
CORREL PHPExcel_Calculation_Statistical::CORREL
COUNT PHPExcel_Calculation_Statistical::COUNT
COUNTA PHPExcel_Calculation_Statistical::COUNTA
COUNTBLANK PHPExcel_Calculation_Statistical::COUNTBLANK
COUNTIF PHPExcel_Calculation_Statistical::COUNTIF
COUNTIFS *** Not yet Implemented
COVAR PHPExcel_Calculation_Statistical::COVAR
CRITBINOM PHPExcel_Calculation_Statistical::CRITBINOM
DEVSQ PHPExcel_Calculation_Statistical::DEVSQ
EXPONDIST PHPExcel_Calculation_Statistical::EXPONDIST
FDIST *** Not yet Implemented
FINV *** Not yet Implemented
FISHER PHPExcel_Calculation_Statistical::FISHER
FISHERINV PHPExcel_Calculation_Statistical::FISHERINV
FORECAST PHPExcel_Calculation_Statistical::FORECAST
FREQUENCY *** Not yet Implemented
FTEST *** Not yet Implemented
GAMMADIST PHPExcel_Calculation_Statistical::GAMMADIST
GAMMAINV PHPExcel_Calculation_Statistical::GAMMAINV
GAMMALN PHPExcel_Calculation_Statistical::GAMMALN
GEOMEAN PHPExcel_Calculation_Statistical::GEOMEAN
GROWTH PHPExcel_Calculation_Statistical::GROWTH
HARMEAN PHPExcel_Calculation_Statistical::HARMEAN
HYPGEOMDIST PHPExcel_Calculation_Statistical::HYPGEOMDIST
INTERCEPT PHPExcel_Calculation_Statistical::INTERCEPT
KURT PHPExcel_Calculation_Statistical::KURT
LARGE PHPExcel_Calculation_Statistical::LARGE
LINEST PHPExcel_Calculation_Statistical::LINEST
LOGEST PHPExcel_Calculation_Statistical::LOGEST
LOGINV PHPExcel_Calculation_Statistical::LOGINV
LOGNORMDIST PHPExcel_Calculation_Statistical::LOGNORMDIST
MAX PHPExcel_Calculation_Statistical::MAX
MAXA PHPExcel_Calculation_Statistical::MAXA
MAXIF PHPExcel_Calculation_Statistical::MAXIF
MEDIAN PHPExcel_Calculation_Statistical::MEDIAN
MEDIANIF *** Not yet Implemented
MIN PHPExcel_Calculation_Statistical::MIN
MINA PHPExcel_Calculation_Statistical::MINA
MINIF PHPExcel_Calculation_Statistical::MINIF
MODE PHPExcel_Calculation_Statistical::MODE
NEGBINOMDIST PHPExcel_Calculation_Statistical::NEGBINOMDIST
NORMDIST PHPExcel_Calculation_Statistical::NORMDIST
NORMINV PHPExcel_Calculation_Statistical::NORMINV
NORMSDIST PHPExcel_Calculation_Statistical::NORMSDIST
NORMSINV PHPExcel_Calculation_Statistical::NORMSINV
PEARSON PHPExcel_Calculation_Statistical::CORREL
PERCENTILE PHPExcel_Calculation_Statistical::PERCENTILE
PERCENTRANK PHPExcel_Calculation_Statistical::PERCENTRANK
PERMUT PHPExcel_Calculation_Statistical::PERMUT
POISSON PHPExcel_Calculation_Statistical::POISSON
PROB *** Not yet Implemented
QUARTILE PHPExcel_Calculation_Statistical::QUARTILE
RANK PHPExcel_Calculation_Statistical::RANK
RSQ PHPExcel_Calculation_Statistical::RSQ
SKEW PHPExcel_Calculation_Statistical::SKEW
SLOPE PHPExcel_Calculation_Statistical::SLOPE
SMALL PHPExcel_Calculation_Statistical::SMALL
STANDARDIZE PHPExcel_Calculation_Statistical::STANDARDIZE
STDEV PHPExcel_Calculation_Statistical::STDEV
STDEVA PHPExcel_Calculation_Statistical::STDEVA
STDEVP PHPExcel_Calculation_Statistical::STDEVP
STDEVPA PHPExcel_Calculation_Statistical::STDEVPA
STEYX PHPExcel_Calculation_Statistical::STEYX
TDIST PHPExcel_Calculation_Statistical::TDIST
TINV PHPExcel_Calculation_Statistical::TINV
TREND PHPExcel_Calculation_Statistical::TREND
TRIMMEAN PHPExcel_Calculation_Statistical::TRIMMEAN
TTEST *** Not yet Implemented
VAR PHPExcel_Calculation_Statistical::VARFunc
VARA PHPExcel_Calculation_Statistical::VARA
VARP PHPExcel_Calculation_Statistical::VARP
VARPA PHPExcel_Calculation_Statistical::VARPA
WEIBULL PHPExcel_Calculation_Statistical::WEIBULL
ZTEST PHPExcel_Calculation_Statistical::ZTEST
CATEGORY_TEXT_AND_DATA
ASC *** Not yet Implemented
BAHTTEXT *** Not yet Implemented
CHAR PHPExcel_Calculation_TextData::CHARACTER
CLEAN PHPExcel_Calculation_TextData::TRIMNONPRINTABLE
CODE PHPExcel_Calculation_TextData::ASCIICODE
CONCATENATE PHPExcel_Calculation_TextData::CONCATENATE
DOLLAR PHPExcel_Calculation_TextData::DOLLAR
EXACT *** Not yet Implemented
FIND PHPExcel_Calculation_TextData::SEARCHSENSITIVE
FINDB PHPExcel_Calculation_TextData::SEARCHSENSITIVE
FIXED PHPExcel_Calculation_TextData::FIXEDFORMAT
JIS *** Not yet Implemented
LEFT PHPExcel_Calculation_TextData::LEFT
LEFTB PHPExcel_Calculation_TextData::LEFT
LEN PHPExcel_Calculation_TextData::STRINGLENGTH
LENB PHPExcel_Calculation_TextData::STRINGLENGTH
LOWER PHPExcel_Calculation_TextData::LOWERCASE
MID PHPExcel_Calculation_TextData::MID
MIDB PHPExcel_Calculation_TextData::MID
PHONETIC *** Not yet Implemented
PROPER PHPExcel_Calculation_TextData::PROPERCASE
REPLACE PHPExcel_Calculation_TextData::REPLACE
REPLACEB PHPExcel_Calculation_TextData::REPLACE
REPT str_repeat
RIGHT PHPExcel_Calculation_TextData::RIGHT
RIGHTB PHPExcel_Calculation_TextData::RIGHT
SEARCH PHPExcel_Calculation_TextData::SEARCHINSENSITIVE
SEARCHB PHPExcel_Calculation_TextData::SEARCHINSENSITIVE
SUBSTITUTE PHPExcel_Calculation_TextData::SUBSTITUTE
T PHPExcel_Calculation_TextData::RETURNSTRING
TEXT PHPExcel_Calculation_TextData::TEXTFORMAT
TRIM PHPExcel_Calculation_TextData::TRIMSPACES
UPPER PHPExcel_Calculation_TextData::UPPERCASE
VALUE PHPExcel_Calculation_TextData::VALUE

View File

@ -0,0 +1,381 @@
ABS CATEGORY_MATH_AND_TRIG abs
ACCRINT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::ACCRINT
ACCRINTM CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::ACCRINTM
ACOS CATEGORY_MATH_AND_TRIG acos
ACOSH CATEGORY_MATH_AND_TRIG acosh
ADDRESS CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::CELL_ADDRESS
AMORDEGRC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::AMORDEGRC
AMORLINC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::AMORLINC
AND CATEGORY_LOGICAL PHPExcel_Calculation_Logical::LOGICAL_AND
AREAS CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented
ASC CATEGORY_TEXT_AND_DATA *** Not yet Implemented
ASIN CATEGORY_MATH_AND_TRIG asin
ASINH CATEGORY_MATH_AND_TRIG asinh
ATAN CATEGORY_MATH_AND_TRIG atan
ATAN2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::REVERSE_ATAN2
ATANH CATEGORY_MATH_AND_TRIG atanh
AVEDEV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVEDEV
AVERAGE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVERAGE
AVERAGEA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVERAGEA
AVERAGEIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVERAGEIF
AVERAGEIFS CATEGORY_STATISTICAL *** Not yet Implemented
BAHTTEXT CATEGORY_TEXT_AND_DATA *** Not yet Implemented
BESSELI CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELI
BESSELJ CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELJ
BESSELK CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELK
BESSELY CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELY
BETADIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::BETADIST
BETAINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::BETAINV
BIN2DEC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BINTODEC
BIN2HEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BINTOHEX
BIN2OCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BINTOOCT
BINOMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::BINOMDIST
CEILING CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::CEILING
CELL CATEGORY_INFORMATION *** Not yet Implemented
CHAR CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::CHARACTER
CHIDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CHIDIST
CHIINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CHIINV
CHITEST CATEGORY_STATISTICAL *** Not yet Implemented
CHOOSE CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::CHOOSE
CLEAN CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::TRIMNONPRINTABLE
CODE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::ASCIICODE
COLUMN CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::COLUMN
COLUMNS CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::COLUMNS
COMBIN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::COMBIN
COMPLEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::COMPLEX
CONCATENATE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::CONCATENATE
CONFIDENCE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CONFIDENCE
CONVERT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::CONVERTUOM
CORREL CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CORREL
COS CATEGORY_MATH_AND_TRIG cos
COSH CATEGORY_MATH_AND_TRIG cosh
COUNT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNT
COUNTA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNTA
COUNTBLANK CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNTBLANK
COUNTIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNTIF
COUNTIFS CATEGORY_STATISTICAL *** Not yet Implemented
COUPDAYBS CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPDAYBS
COUPDAYS CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPDAYS
COUPDAYSNC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPDAYSNC
COUPNCD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPNCD
COUPNUM CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPNUM
COUPPCD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPPCD
COVAR CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COVAR
CRITBINOM CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CRITBINOM
CUBEKPIMEMBER CATEGORY_CUBE *** Not yet Implemented
CUBEMEMBER CATEGORY_CUBE *** Not yet Implemented
CUBEMEMBERPROPERTY CATEGORY_CUBE *** Not yet Implemented
CUBERANKEDMEMBER CATEGORY_CUBE *** Not yet Implemented
CUBESET CATEGORY_CUBE *** Not yet Implemented
CUBESETCOUNT CATEGORY_CUBE *** Not yet Implemented
CUBEVALUE CATEGORY_CUBE *** Not yet Implemented
CUMIPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::CUMIPMT
CUMPRINC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::CUMPRINC
DATE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATE
DATEDIF CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATEDIF
DATEVALUE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATEVALUE
DAVERAGE CATEGORY_DATABASE PHPExcel_Calculation_Database::DAVERAGE
DAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DAYOFMONTH
DAYS360 CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DAYS360
DB CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DB
DCOUNT CATEGORY_DATABASE PHPExcel_Calculation_Database::DCOUNT
DCOUNTA CATEGORY_DATABASE PHPExcel_Calculation_Database::DCOUNTA
DDB CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DDB
DEC2BIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DECTOBIN
DEC2HEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DECTOHEX
DEC2OCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DECTOOCT
DEGREES CATEGORY_MATH_AND_TRIG rad2deg
DELTA CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DELTA
DEVSQ CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::DEVSQ
DGET CATEGORY_DATABASE PHPExcel_Calculation_Database::DGET
DISC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DISC
DMAX CATEGORY_DATABASE PHPExcel_Calculation_Database::DMAX
DMIN CATEGORY_DATABASE PHPExcel_Calculation_Database::DMIN
DOLLAR CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::DOLLAR
DOLLARDE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DOLLARDE
DOLLARFR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DOLLARFR
DPRODUCT CATEGORY_DATABASE PHPExcel_Calculation_Database::DPRODUCT
DSTDEV CATEGORY_DATABASE PHPExcel_Calculation_Database::DSTDEV
DSTDEVP CATEGORY_DATABASE PHPExcel_Calculation_Database::DSTDEVP
DSUM CATEGORY_DATABASE PHPExcel_Calculation_Database::DSUM
DURATION CATEGORY_FINANCIAL *** Not yet Implemented
DVAR CATEGORY_DATABASE PHPExcel_Calculation_Database::DVAR
DVARP CATEGORY_DATABASE PHPExcel_Calculation_Database::DVARP
EDATE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::EDATE
EFFECT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::EFFECT
EOMONTH CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::EOMONTH
ERF CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::ERF
ERFC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::ERFC
ERROR.TYPE CATEGORY_INFORMATION PHPExcel_Calculation_Functions::ERROR_TYPE
EVEN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::EVEN
EXACT CATEGORY_TEXT_AND_DATA *** Not yet Implemented
EXP CATEGORY_MATH_AND_TRIG exp
EXPONDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::EXPONDIST
FACT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::FACT
FACTDOUBLE CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::FACTDOUBLE
FALSE CATEGORY_LOGICAL PHPExcel_Calculation_Logical::FALSE
FDIST CATEGORY_STATISTICAL *** Not yet Implemented
FIND CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHSENSITIVE
FINDB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHSENSITIVE
FINV CATEGORY_STATISTICAL *** Not yet Implemented
FISHER CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::FISHER
FISHERINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::FISHERINV
FIXED CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::FIXEDFORMAT
FLOOR CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::FLOOR
FORECAST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::FORECAST
FREQUENCY CATEGORY_STATISTICAL *** Not yet Implemented
FTEST CATEGORY_STATISTICAL *** Not yet Implemented
FV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::FV
FVSCHEDULE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::FVSCHEDULE
GAMMADIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GAMMADIST
GAMMAINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GAMMAINV
GAMMALN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GAMMALN
GCD CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::GCD
GEOMEAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GEOMEAN
GESTEP CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::GESTEP
GETPIVOTDATA CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented
GROWTH CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GROWTH
HARMEAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::HARMEAN
HEX2BIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::HEXTOBIN
HEX2DEC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::HEXTODEC
HEX2OCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::HEXTOOCT
HLOOKUP CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::HLOOKUP
HOUR CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::HOUROFDAY
HYPERLINK CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::HYPERLINK
HYPGEOMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::HYPGEOMDIST
IF CATEGORY_LOGICAL PHPExcel_Calculation_Logical::STATEMENT_IF
IFERROR CATEGORY_LOGICAL PHPExcel_Calculation_Logical::IFERROR
IMABS CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMABS
IMAGINARY CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMAGINARY
IMARGUMENT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMARGUMENT
IMCONJUGATE CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMCONJUGATE
IMCOS CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMCOS
IMDIV CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMDIV
IMEXP CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMEXP
IMLN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMLN
IMLOG10 CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMLOG10
IMLOG2 CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMLOG2
IMPOWER CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMPOWER
IMPRODUCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMPRODUCT
IMREAL CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMREAL
IMSIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSIN
IMSQRT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSQRT
IMSUB CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSUB
IMSUM CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSUM
INDEX CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::INDEX
INDIRECT CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::INDIRECT
INFO CATEGORY_INFORMATION *** Not yet Implemented
INT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::INT
INTERCEPT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::INTERCEPT
INTRATE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::INTRATE
IPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::IPMT
IRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::IRR
ISBLANK CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_BLANK
ISERR CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_ERR
ISERROR CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_ERROR
ISEVEN CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_EVEN
ISLOGICAL CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_LOGICAL
ISNA CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_NA
ISNONTEXT CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_NONTEXT
ISNUMBER CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_NUMBER
ISODD CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_ODD
ISPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::ISPMT
ISREF CATEGORY_INFORMATION *** Not yet Implemented
ISTEXT CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_TEXT
JIS CATEGORY_TEXT_AND_DATA *** Not yet Implemented
KURT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::KURT
LARGE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LARGE
LCM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::LCM
LEFT CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::LEFT
LEFTB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::LEFT
LEN CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::STRINGLENGTH
LENB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::STRINGLENGTH
LINEST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LINEST
LN CATEGORY_MATH_AND_TRIG log
LOG CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::LOG_BASE
LOG10 CATEGORY_MATH_AND_TRIG log10
LOGEST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LOGEST
LOGINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LOGINV
LOGNORMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LOGNORMDIST
LOOKUP CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::LOOKUP
LOWER CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::LOWERCASE
MATCH CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::MATCH
MAX CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MAX
MAXA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MAXA
MAXIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MAXIF
MDETERM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MDETERM
MDURATION CATEGORY_FINANCIAL *** Not yet Implemented
MEDIAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MEDIAN
MEDIANIF CATEGORY_STATISTICAL *** Not yet Implemented
MID CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::MID
MIDB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::MID
MIN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MIN
MINA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MINA
MINIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MINIF
MINUTE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::MINUTEOFHOUR
MINVERSE CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MINVERSE
MIRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::MIRR
MMULT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MMULT
MOD CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MOD
MODE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MODE
MONTH CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::MONTHOFYEAR
MROUND CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MROUND
MULTINOMIAL CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MULTINOMIAL
N CATEGORY_INFORMATION PHPExcel_Calculation_Functions::N
NA CATEGORY_INFORMATION PHPExcel_Calculation_Functions::NA
NEGBINOMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NEGBINOMDIST
NETWORKDAYS CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::NETWORKDAYS
NOMINAL CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::NOMINAL
NORMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMDIST
NORMINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMINV
NORMSDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMSDIST
NORMSINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMSINV
NOT CATEGORY_LOGICAL PHPExcel_Calculation_Logical::NOT
NOW CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATETIMENOW
NPER CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::NPER
NPV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::NPV
OCT2BIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::OCTTOBIN
OCT2DEC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::OCTTODEC
OCT2HEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::OCTTOHEX
ODD CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ODD
ODDFPRICE CATEGORY_FINANCIAL *** Not yet Implemented
ODDFYIELD CATEGORY_FINANCIAL *** Not yet Implemented
ODDLPRICE CATEGORY_FINANCIAL *** Not yet Implemented
ODDLYIELD CATEGORY_FINANCIAL *** Not yet Implemented
OFFSET CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::OFFSET
OR CATEGORY_LOGICAL PHPExcel_Calculation_Logical::LOGICAL_OR
PEARSON CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CORREL
PERCENTILE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::PERCENTILE
PERCENTRANK CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::PERCENTRANK
PERMUT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::PERMUT
PHONETIC CATEGORY_TEXT_AND_DATA *** Not yet Implemented
PI CATEGORY_MATH_AND_TRIG pi
PMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PMT
POISSON CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::POISSON
POWER CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::POWER
PPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PPMT
PRICE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PRICE
PRICEDISC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PRICEDISC
PRICEMAT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PRICEMAT
PROB CATEGORY_STATISTICAL *** Not yet Implemented
PRODUCT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::PRODUCT
PROPER CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::PROPERCASE
PV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PV
QUARTILE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::QUARTILE
QUOTIENT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::QUOTIENT
RADIANS CATEGORY_MATH_AND_TRIG deg2rad
RAND CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::RAND
RANDBETWEEN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::RAND
RANK CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::RANK
RATE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::RATE
RECEIVED CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::RECEIVED
REPLACE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::REPLACE
REPLACEB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::REPLACE
REPT CATEGORY_TEXT_AND_DATA str_repeat
RIGHT CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::RIGHT
RIGHTB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::RIGHT
ROMAN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ROMAN
ROUND CATEGORY_MATH_AND_TRIG round
ROUNDDOWN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ROUNDDOWN
ROUNDUP CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ROUNDUP
ROW CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::ROW
ROWS CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::ROWS
RSQ CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::RSQ
RTD CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented
SEARCH CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHINSENSITIVE
SEARCHB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHINSENSITIVE
SECOND CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::SECONDOFMINUTE
SERIESSUM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SERIESSUM
SIGN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SIGN
SIN CATEGORY_MATH_AND_TRIG sin
SINH CATEGORY_MATH_AND_TRIG sinh
SKEW CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::SKEW
SLN CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::SLN
SLOPE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::SLOPE
SMALL CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::SMALL
SQRT CATEGORY_MATH_AND_TRIG sqrt
SQRTPI CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SQRTPI
STANDARDIZE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STANDARDIZE
STDEV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEV
STDEVA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEVA
STDEVP CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEVP
STDEVPA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEVPA
STEYX CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STEYX
SUBSTITUTE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SUBSTITUTE
SUBTOTAL CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUBTOTAL
SUM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUM
SUMIF CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMIF
SUMIFS CATEGORY_MATH_AND_TRIG *** Not yet Implemented
SUMPRODUCT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMPRODUCT
SUMSQ CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMSQ
SUMX2MY2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMX2MY2
SUMX2PY2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMX2PY2
SUMXMY2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMXMY2
SYD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::SYD
T CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::RETURNSTRING
TAN CATEGORY_MATH_AND_TRIG tan
TANH CATEGORY_MATH_AND_TRIG tanh
TBILLEQ CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::TBILLEQ
TBILLPRICE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::TBILLPRICE
TBILLYIELD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::TBILLYIELD
TDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TDIST
TEXT CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::TEXTFORMAT
TIME CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::TIME
TIMEVALUE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::TIMEVALUE
TINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TINV
TODAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATENOW
TRANSPOSE CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::TRANSPOSE
TREND CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TREND
TRIM CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::TRIMSPACES
TRIMMEAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TRIMMEAN
TRUE CATEGORY_LOGICAL PHPExcel_Calculation_Logical::TRUE
TRUNC CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::TRUNC
TTEST CATEGORY_STATISTICAL *** Not yet Implemented
TYPE CATEGORY_INFORMATION PHPExcel_Calculation_Functions::TYPE
UPPER CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::UPPERCASE
USDOLLAR CATEGORY_FINANCIAL *** Not yet Implemented
VALUE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::VALUE
VAR CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARFunc
VARA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARA
VARP CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARP
VARPA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARPA
VDB CATEGORY_FINANCIAL *** Not yet Implemented
VERSION CATEGORY_INFORMATION PHPExcel_Calculation_Functions::VERSION
VLOOKUP CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::VLOOKUP
WEEKDAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DAYOFWEEK
WEEKNUM CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::WEEKOFYEAR
WEIBULL CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::WEIBULL
WORKDAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::WORKDAY
XIRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::XIRR
XNPV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::XNPV
YEAR CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::YEAR
YEARFRAC CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::YEARFRAC
YIELD CATEGORY_FINANCIAL *** Not yet Implemented
YIELDDISC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::YIELDDISC
YIELDMAT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::YIELDMAT
ZTEST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::ZTEST

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Font Name="Tahoma" Size="8.25" />
<Class Name="ClassDiagrams.PHPExcel" Collapsed="true">
<Position X="3.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<FileName>Classes\PHPExcel.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Worksheets" />
</ShowAsAssociation>
</Class>
<Class Name="ClassDiagrams.Worksheet" Collapsed="true">
<Position X="0.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<FileName>Classes\Worksheet.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
</Class>
<Interface Name="ClassDiagrams.PHPExcel_Reader_IReader" Collapsed="true">
<Position X="2.25" Y="2.5" Width="2" />
<TypeIdentifier>
<FileName>Classes\IReader.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="reads" />
</ShowAsAssociation>
<AssociationLine Name="reads" Type="ClassDiagrams.PHPExcel">
<MemberNameLabel ManuallyPlaced="true" ManuallySized="true">
<Position X="0.152" Y="1.279" Height="0.16" Width="0.597" />
</MemberNameLabel>
</AssociationLine>
</Interface>
<Interface Name="ClassDiagrams.PHPExcel_Writer_IWriter" Collapsed="true">
<Position X="4.5" Y="2.5" Width="2" />
<TypeIdentifier>
<FileName>Classes\IWriter.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="writes" />
</ShowAsAssociation>
<AssociationLine Name="writes" Type="ClassDiagrams.PHPExcel">
<MemberNameLabel ManuallyPlaced="true" ManuallySized="true">
<Position X="-1.002" Y="1.298" Height="0.16" Width="0.764" />
</MemberNameLabel>
</AssociationLine>
</Interface>
</ClassDiagram>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="https://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClassDiagrams</RootNamespace>
<AssemblyName>ClassDiagrams</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<None Include="Architecture.cd" />
<None Include="ReaderWriter.cd" />
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\IReader.cs" />
<Compile Include="Classes\IWriter.cs" />
<Compile Include="Classes\PHPExcel_IOFactory.cs" />
<Compile Include="Classes\Worksheet.cs" />
<Compile Include="Classes\PHPExcel.cs" />
<Compile Include="Classes\PHPExcel_Reader_Excel2007.cs" />
<Compile Include="Classes\PHPExcel_Reader_Serialized.cs" />
<Compile Include="Classes\PHPExcel_Writer_Excel2007.cs" />
<Compile Include="Classes\PHPExcel_Writer_Serialized.cs" />
<Compile Include="Classes\PHPExcel_Reader_Excel5.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Exports\Architecture.png" />
<Content Include="Exports\ReaderWriter.png" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,5 @@
<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagrams", "ClassDiagrams.csproj", "{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public interface PHPExcel_Reader_IReader
{
PHPExcel reads
{
get;
set;
}
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public interface PHPExcel_Writer_IWriter
{
PHPExcel writes
{
get;
set;
}
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel
{
/// <remarks></remarks>
public Worksheet Worksheets
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
}
public class PHPExcel_Writer_PDF : PHPExcel_Writer_IWriter
{
#region PHPExcel_Writer_IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_IOFactory
{
public PHPExcel_Reader_IReader createsReader
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public PHPExcel_Writer_IWriter createsWriter
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public PHPExcel_Writer_IWriter createWriter()
{
throw new System.NotImplementedException();
}
public PHPExcel_Reader_IReader createReader()
{
throw new System.NotImplementedException();
}
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Reader_Excel2007 : PHPExcel_Reader_IReader
{
#region IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Reader_Excel5 : PHPExcel_Reader_IReader
{
#region PHPExcel_Writer_IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Reader_Excel2003XML : PHPExcel_Reader_IReader
{
#region PHPExcel_Writer_IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Reader_SYLK : PHPExcel_Reader_IReader
{
#region PHPExcel_Writer_IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Reader_Serialized : PHPExcel_Reader_IReader
{
#region IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Reader_CSV : PHPExcel_Reader_IReader
{
#region IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Writer_Excel2007 : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Writer_Serialized : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Writer_CSV : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Writer_Excel5 : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Writer_HTML : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class Worksheet
{
}
public class CopyOfWorksheet
{
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="ClassDiagrams.PHPExcel_Reader_Excel2007" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="3.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel2007.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_Excel2007" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="3.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Excel2007.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_Serialized" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="4.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_Serialized" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="4.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_CSV" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_CSV" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_Excel5" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="5.75" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_HTML" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="6.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_Excel5" Collapsed="true">
<Position X="0.5" Y="5.75" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_PDF" Collapsed="true">
<Position X="3.5" Y="7.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_IOFactory">
<Position X="2" Y="0.5" Width="2.25" />
<AssociationLine Name="createsReader" Type="ClassDiagrams.PHPExcel_Reader_IReader">
<MemberNameLabel ManuallyPlaced="true">
<Position X="0.11" Y="0.06" />
</MemberNameLabel>
</AssociationLine>
<AssociationLine Name="createsWriter" Type="ClassDiagrams.PHPExcel_Writer_IWriter">
<MemberNameLabel ManuallyPlaced="true">
<Position X="-1.088" Y="0.081" />
</MemberNameLabel>
</AssociationLine>
<TypeIdentifier>
<HashCode>AIAAAAAAAAEAAAAAAQAAAAAAAAAAAAAAAAABAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_IOFactory.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="createsReader" />
<Property Name="createsWriter" />
</ShowAsAssociation>
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_Excel2003XML" Collapsed="true">
<Position X="0.5" Y="6.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_SYLK" Collapsed="true">
<Position X="0.5" Y="7.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Interface Name="ClassDiagrams.PHPExcel_Writer_IWriter" Collapsed="true">
<Position X="3.5" Y="2.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\IWriter.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="ClassDiagrams.PHPExcel_Reader_IReader" Collapsed="true">
<Position X="0.5" Y="2.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\IReader.cs</FileName>
</TypeIdentifier>
</Interface>
<Font Name="Tahoma" Size="8.25" />
</ClassDiagram>

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -0,0 +1,11 @@
# Calculation Engine - Formula Function Reference
## Frequently asked questions
The up-to-date F.A.Q. page for PHPExcel can be found on [https://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=FAQ&referringTitle=Requirements][1].
### Formulas dont seem to be calculated in Excel2003 using compatibility pack?
This is normal behaviour of the compatibility pack, Excel2007 displays this correctly. Use PHPExcel_Writer_Excel5 if you really need calculated values, or force recalculation in Excel2003.
[1]: https://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=FAQ&referringTitle=Requirements

View File

@ -0,0 +1,123 @@
# Calculation Engine - Formula Function Reference
## Function Reference
### Handling Date and Time Values
#### Excel functions that return a Date and Time value
Any of the Date and Time functions that return a date value in Excel can return either an Excel timestamp or a PHP timestamp or date object.
It is possible for scripts to change the data type used for returning date values by calling the PHPExcel_Calculation_Functions::setReturnDateType() method:
```php
PHPExcel_Calculation_Functions::setReturnDateType($returnDateType);
```
where the following constants can be used for $returnDateType
- PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC
- PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT
- PHPExcel_Calculation_Functions::RETURNDATE_EXCEL
The method will return a Boolean True on success, False on failure (e.g. if an invalid value is passed in for the return date type).
The PHPExcel_Calculation_Functions::getReturnDateType() method can be used to determine the current value of this setting:
```php
$returnDateType = PHPExcel_Calculation_Functions::getReturnDateType();
```
The default is RETURNDATE_PHP_NUMERIC.
##### PHP Timestamps
If RETURNDATE_PHP_NUMERIC is set for the Return Date Type, then any date value returned to the calling script by any access to the Date and Time functions in Excel will be an integer value that represents the number of seconds from the PHP/Unix base date. The PHP/Unix base date (0) is 00:00 UST on 1st January 1970. This value can be positive or negative: so a value of -3600 would be 23:00 hrs on 31st December 1969; while a value of +3600 would be 01:00 hrs on 1st January 1970. This gives PHP a date range of between 14th December 1901 and 19th January 2038.
##### PHP DateTime Objects
If the Return Date Type is set for RETURNDATE_PHP_NUMERIC, then any date value returned to the calling script by any access to the Date and Time functions in Excel will be a PHP date/time object.
##### Excel Timestamps
If RETURNDATE_EXCEL is set for the Return Date Type, then the returned date value by any access to the Date and Time functions in Excel will be a floating point value that represents a number of days from the Excel base date. The Excel base date is determined by which calendar Excel uses: the Windows 1900 or the Mac 1904 calendar. 1st January 1900 is the base date for the Windows 1900 calendar while 1st January 1904 is the base date for the Mac 1904 calendar.
It is possible for scripts to change the calendar used for calculating Excel date values by calling the PHPExcel_Shared_Date::setExcelCalendar() method:
```php
PHPExcel_Shared_Date::setExcelCalendar($baseDate);
```
where the following constants can be used for $baseDate
- PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900
- PHPExcel_Shared_Date::CALENDAR_MAC_1904
The method will return a Boolean True on success, False on failure (e.g. if an invalid value is passed in).
The PHPExcel_Shared_Date::getExcelCalendar() method can be used to determine the current value of this setting:
```php
$baseDate = PHPExcel_Shared_Date::getExcelCalendar();
```
The default is CALENDAR_WINDOWS_1900.
##### Functions that return a Date/Time Value
- DATE
- DATEVALUE
- EDATE
- EOMONTH
- NOW
- TIME
- TIMEVALUE
- TODAY
#### Excel functions that accept Date and Time values as parameters
Date values passed in as parameters to a function can be an Excel timestamp or a PHP timestamp; or date object; or a string containing a date value (e.g. '1-Jan-2009'). PHPExcel will attempt to identify their type based on the PHP datatype:
An integer numeric value will be treated as a PHP/Unix timestamp. A real (floating point) numeric value will be treated as an Excel date/timestamp. Any PHP DateTime object will be treated as a DateTime object. Any string value (even one containing straight numeric data) will be converted to a date/time object for validation as a date value based on the server locale settings, so passing through an ambiguous value of '07/08/2008' will be treated as 7th August 2008 if your server settings are UK, but as 8th July 2008 if your server settings are US. However, if you pass through a value such as '31/12/2008' that would be considered an error by a US-based server, but which is not ambiguous, then PHPExcel will attempt to correct this to 31st December 2008. If the content of the string doesnt match any of the formats recognised by the php date/time object implementation of strtotime() (which can handle a wider range of formats than the normal strtotime() function), then the function will return a '#VALUE' error. However, Excel recommends that you should always use date/timestamps for your date functions, and the recommendation for PHPExcel is the same: avoid strings because the result is not predictable.
The same principle applies when data is being written to Excel. Cells containing date actual values (rather than Excel functions that return a date value) are always written as Excel dates, converting where necessary. If a cell formatted as a date contains an integer or date/time object value, then it is converted to an Excel value for writing: if a cell formatted as a date contains a real value, then no conversion is required. Note that string values are written as strings rather than converted to Excel date timestamp values.
##### Functions that expect a Date/Time Value
- DATEDIF
- DAY
- DAYS360
- EDATE
- EOMONTH
- HOUR
- MINUTE
- MONTH
- NETWORKDAYS
- SECOND
- WEEKDAY
- WEEKNUM
- WORKDAY
- YEAR
- YEARFRAC
#### Helper Methods
In addition to the setExcelCalendar() and getExcelCalendar() methods, a number of other methods are available in the PHPExcel_Shared_Date class that can help when working with dates:
##### PHPExcel_Shared_Date::ExcelToPHP($excelDate)
Converts a date/time from an Excel date timestamp to return a PHP serialized date/timestamp.
Note that this method does not trap for Excel dates that fall outside of the valid range for a PHP date timestamp.
##### PHPExcel_Shared_Date::ExcelToPHPObject($excelDate)
Converts a date from an Excel date/timestamp to return a PHP DateTime object.
##### PHPExcel_Shared_Date::PHPToExcel($PHPDate)
Converts a PHP serialized date/timestamp or a PHP DateTime object to return an Excel date timestamp.
##### PHPExcel_Shared_Date::FormattedPHPToExcel($year, $month, $day, $hours=0, $minutes=0, $seconds=0)
Takes year, month and day values (and optional hour, minute and second values) and returns an Excel date timestamp value.

View File

@ -0,0 +1,36 @@
# Calculation Engine - Formula Function Reference
## General Introduction
### Function that are not Supported in Excel5
Not all functions are supported by the Excel 5 Writer. Use of these functions within your workbooks will result in an error when trying to write to Excel5.
The following is the list of those functions that are implemented within PHPExcel, but that cannot currently be written to Excel 5.
#### Cube Functions
Excel Function | Notes
--------------------|---------
CUBEKPIMEMBER | Not yet Implemented
CUBEMEMBER | Not yet Implemented
CUBEMEMBERPROPERTY | Not yet Implemented
CUBERANKEDMEMBER | Not yet Implemented
CUBESET | Not yet Implemented
CUBESETCOUNT | Not yet Implemented
CUBEVALUE | Not yet Implemented
#### Database Functions
Excel Function | Notes
---------------|---------
#### Date and Time Functions
Excel Function | Notes
---------------|---------
EDATE | Not a standard function within Excel 5, but an add-in from the Analysis ToolPak.
EOMONTH | Not a standard function within Excel 5, but an add-in from the Analysis ToolPak.

View File

@ -0,0 +1,34 @@
# Calculation Engine - Formula Function Reference
## Function Reference
### Cube Functions
#### CUBEKPIMEMBER
Not yet implemented.
#### CUBEMEMBER
Not yet implemented.
#### CUBEMEMBERPROPERTY
Not yet implemented.
#### CUBERANKEDMEMBER
Not yet implemented.
#### CUBESET
Not yet implemented.
#### CUBESETCOUNT
Not yet implemented.
#### CUBEVALUE
Not yet implemented.

View File

@ -0,0 +1,618 @@
# Calculation Engine - Formula Function Reference
## Function Reference
### Database Functions
#### DAVERAGE
The DAVERAGE function returns the average value of the cells in a column of a list or database that match conditions you specify.
##### Syntax
```
DAVERAGE (database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The average value of the matching cells.
This is the statistical mean.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DAVERAGE(A4:E10,"Yield",A1:B2)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 12
```
##### Notes
There are no additional notes on this function
#### DCOUNT
The DCOUNT function returns the count of cells that contain a number in a column of a list or database matching conditions that you specify.
##### Syntax
```
DCOUNT(database, [field], criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The count of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DCOUNT(A4:E10,"Height",A1:B3)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 3
```
##### Notes
In MS Excel, The field argument is optional. If field is omitted, DCOUNT counts all records in the database that match the criteria. This logic has not yet been implemented in PHPExcel.
#### DCOUNTA
The DCOUNT function returns the count of cells that arent blank in a column of a list or database and that match conditions that you specify.
##### Syntax
```
DCOUNTA(database, [field], criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The count of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DCOUNTA(A4:E10,"Yield",A1:A3)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 5
```
##### Notes
In MS Excel, The field argument is optional. If field is omitted, DCOUNTA counts all records in the database that match the criteria. This logic has not yet been implemented in PHPExcel.
#### DGET
The DGET function extracts a single value from a column of a list or database that matches conditions that you specify.
##### Syntax
```
DGET(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**mixed** The value from the selected column of the matching row.
#### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=GET(A4:E10,"Age",A1:F2)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 14
```
##### Notes
There are no additional notes on this function
#### DMAX
The DMAX function returns the largest number in a column of a list or database that matches conditions you specify.
##### Syntax
```
DMAX(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The maximum value of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DMAX(A4:E10,"Profit",A1:B2)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 105
```
##### Notes
There are no additional notes on this function
#### DMIN
The DMIN function returns the smallest number in a column of a list or database that matches conditions you specify.
##### Syntax
```
DMIN(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The minimum value of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DMIN(A4:E10,"Yield",A1:A3)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 6
```
##### Notes
There are no additional notes on this function
#### DPRODUCT
The DPRODUCT function multiplies the values in a column of a list or database that match conditions that you specify.
##### Syntax
```
DPRODUCT(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The product of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DPRODUCT(A4:E10,"Yield",A1:B2)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 140
```
##### Notes
There are no additional notes on this function
#### DSTDEV
The DSTDEV function estimates the standard deviation of a population based on a sample by using the numbers in a column of a list or database that match conditions that you specify.
##### Syntax
```
DSTDEV(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The estimated standard deviation of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DSTDEV(A4:E10,"Yield",A1:A3)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 2.97
```
##### Notes
There are no additional notes on this function
#### DSTDEVP
The DSTDEVP function calculates the standard deviation of a population based on the entire population by using the numbers in a column of a list or database that match conditions that you specify.
##### Syntax
```
DSTDEVP(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The estimated standard deviation of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DSTDEVP(A4:E10,"Yield",A1:A3)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 2.65
```
##### Notes
There are no additional notes on this function
#### DSUM
The DSUM function adds the numbers in a column of a list or database that matches conditions you specify.
##### Syntax
```
DSUM(database, field, criteria)
```
##### Parameters
**database** The range of cells that makes up the list or database.
A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
**field** Indicates which column of the database is used in the function.
Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
**criteria** The range of cells that contains the conditions you specify.
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
##### Return Value
**float** The total value of the matching cells.
##### Examples
```php
$database = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ),
array( 'Apple', 18, 20, 14, 105.00 ),
array( 'Pear', 12, 12, 10, 96.00 ),
array( 'Cherry', 13, 14, 9, 105.00 ),
array( 'Apple', 14, 15, 10, 75.00 ),
array( 'Pear', 9, 8, 8, 76.80 ),
array( 'Apple', 8, 9, 6, 45.00 ),
);
$criteria = array(
array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ),
array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ),
array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ),
);
$worksheet->fromArray( $criteria, NULL, 'A1' )
->fromArray( $database, NULL, 'A4' );
$worksheet->setCellValue('A12', '=DMIN(A4:E10,"Profit",A1:A2)');
$retVal = $worksheet->getCell('A12')->getCalculatedValue();
// $retVal = 225
```
##### Notes
There are no additional notes on this function
#### DVAR
Not yet documented.
#### DVARP
Not yet documented.

View File

@ -0,0 +1,19 @@
# PHPExcel AutoFilter Reference
## AutoFilters
Each worksheet in an Excel Workbook can contain a single autoFilter range. Filtered data displays only the rows that meet criteria that you specify and hides rows that you do not want displayed. You can filter by more than one column: filters are additive, which means that each additional filter is based on the current filter and further reduces the subset of data.
![01-01-autofilter.png](./images/01-01-autofilter.png "")
When an AutoFilter is applied to a range of cells, the first row in an autofilter range will be the heading row, which displays the autoFilter dropdown icons. It is not part of the actual autoFiltered data. All subsequent rows are the autoFiltered data. So an AutoFilter range should always contain the heading row and one or more data rows (one data row is pretty meaningless), but PHPExcel won't actually stop you specifying a meaningless range: it's up to you as the developer to avoid such errors.
To determine if a filter is applied, note the icon in the column heading. A drop-down arrow (![01-03-filter-icon-1.png](./images/01-03-filter-icon-1.png "")) means that filtering is enabled but not applied. In MS Excel, when you hover over the heading of a column with filtering enabled but not applied, a screen tip displays the cell text for the first row in that column, and the message "(Showing All)".
![01-02-autofilter.png](./images/01-02-autofilter.png "")
A Filter button (![01-03-filter-icon-2.png](./images/01-03-filter-icon-2.png "")) means that a filter is applied. When you hover over the heading of a filtered column, a screen tip displays the filter that has been applied to that column, such as "Equals a red cell color" or "Larger than 150".
![01-04-autofilter.png](./images/01-04-autofilter.png "")

View File

@ -0,0 +1,24 @@
# PHPExcel AutoFilter Reference
## Setting an AutoFilter area on a worksheet
To set an autoFilter on a range of cells.
```php
$objPHPExcel->getActiveSheet()->setAutoFilter('A1:E20');
```
The first row in an autofilter range will be the heading row, which displays the autoFilter dropdown icons. It is not part of the actual autoFiltered data. All subsequent rows are the autoFiltered data. So an AutoFilter range should always contain the heading row and one or more data rows (one data row is pretty meaningless, but PHPExcel won't actually stop you specifying a meaningless range: it's up to you as the developer to avoid such errors.
If you want to set the whole worksheet as an autofilter region
```php
$objPHPExcel->getActiveSheet()->setAutoFilter(
$objPHPExcel->getActiveSheet()
->calculateWorksheetDimension()
);
```
This enables filtering, but does not actually apply any filters.

View File

@ -0,0 +1,27 @@
# PHPExcel AutoFilter Reference
## Autofilter Expressions
PHPEXcel 1.7.8 introduced the ability to actually create, read and write filter expressions; initially only for Excel2007 files, but later releases will extend this to other formats.
To apply a filter expression to an autoFilter range, you first need to identify which column you're going to be applying this filter to.
```php
$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter();
$columnFilter = $autoFilter->getColumn('C');
```
This returns an autoFilter column object, and you can then apply filter expressions to that column.
There are a number of different types of autofilter expressions. The most commonly used are:
- Simple Filters
- DateGroup Filters
- Custom filters
- Dynamic Filters
- Top Ten Filters
These different types are mutually exclusive within any single column. You should not mix the different types of filter in the same column. PHPExcel will not actively prevent you from doing this, but the results are unpredictable.
Other filter expression types (such as cell colour filters) are not yet supported.

View File

@ -0,0 +1,52 @@
# PHPExcel AutoFilter Reference
## Autofilter Expressions
### Simple filters
In MS Excel, Simple Filters are a dropdown list of all values used in that column, and the user can select which ones they want to display and which ones they want to hide by ticking and unticking the checkboxes alongside each option. When the filter is applied, rows containing the checked entries will be displayed, rows that don't contain those values will be hidden.
![04-01-simple-autofilter.png](./images/04-01-simple-autofilter.png "")
To create a filter expression, we need to start by identifying the filter type. In this case, we're just going to specify that this filter is a standard filter.
```php
$columnFilter->setFilterType(
PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER
);
```
Now we've identified the filter type, we can create a filter rule and set the filter values:
When creating a simple filter in PHPExcel, you only need to specify the values for "checked" columns: you do this by creating a filter rule for each value.
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'France'
);
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'Germany'
);
```
This creates two filter rules: the column will be filtered by values that match “France” OR “Germany”. For Simple Filters, you can create as many rules as you want
Simple filters are always a comparison match of EQUALS, and multiple standard filters are always treated as being joined by an OR condition.
#### Matching Blanks
If you want to create a filter to select blank cells, you would use:
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
''
);
```

View File

@ -0,0 +1,48 @@
# PHPExcel AutoFilter Reference
## Autofilter Expressions
### DateGroup Filters
In MS Excel, DateGroup filters provide a series of dropdown filter selectors for date values, so you can specify entire years, or months within a year, or individual days within each month.
![04-02-dategroup-autofilter.png](./images/04-02-dategroup-autofilter.png "")
DateGroup filters are still applied as a Standard Filter type.
```php
$columnFilter->setFilterType(
PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER
);
```
Creating a dateGroup filter in PHPExcel, you specify the values for "checked" columns as an associative array of year. month, day, hour minute and second. To select a year and month, you need to create a DateGroup rule identifying the selected year and month:
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
array(
'year' => 2012,
'month' => 1
)
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP
);
```
The key values for the associative array are:
- year
- month
- day
- hour
- minute
- second
Like Standard filters, DateGroup filters are always a match of EQUALS, and multiple standard filters are always treated as being joined by an OR condition.
Note that we alse specify a ruleType: to differentiate this from a standard filter, we explicitly set the Rule's Type to AUTOFILTER_RULETYPE_DATEGROUP. As with standard filters, we can create any number of DateGroup Filters.

View File

@ -0,0 +1,84 @@
# PHPExcel AutoFilter Reference
## Autofilter Expressions
### Custom filters
In MS Excel, Custom filters allow us to select more complex conditions using an operator as well as a value. Typical examples might be values that fall within a range (e.g. between -20 and +20), or text values with wildcards (e.g. beginning with the letter U). To handle this, they
![04-03-custom-autofilter-1.png](./images/04-03-custom-autofilter-1.png "")
![04-03-custom-autofilter-2.png](./images/04-03-custom-autofilter-2.png "")
Custom filters are limited to 2 rules, and these can be joined using either an AND or an OR.
We start by specifying a Filter type, this time a CUSTOMFILTER.
```php
$columnFilter->setFilterType(
PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER
);
```
And then define our rules.
The following shows a simple wildcard filter to show all column entries beginning with the letter 'U'.
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'U*'
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER
);
```
MS Excel uses \* as a wildcard to match any number of characters, and ? as a wildcard to match a single character. 'U\*' equates to "begins with a 'U'"; '\*U' equates to "ends with a 'U'"; and '\*U\*' equates to "contains a 'U'"
If you want to match explicitly against a \* or a ? character, you can escape it with a tilde (~), so ?~\*\* would explicitly match for a \* character as the second character in the cell value, followed by any number of other characters. The only other character that needs escaping is the ~ itself.
To create a "between" condition, we need to define two rules:
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,
-20
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER
);
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,
20
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER
);
```
We also set the rule type to CUSTOMFILTER.
This defined two rules, filtering numbers that are >= -20 OR <= 20, so we also need to modify the join condition to reflect AND rather than OR.
```php
$columnFilter->setAndOr(
PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_ANDOR_AND
);
```
The valid set of operators for Custom Filters are defined in the PHPExcel_Worksheet_AutoFilter_Column_Rule class, and comprise:
Operator Constant | Value |
------------------------------------------|----------------------|
AUTOFILTER_COLUMN_RULE_EQUAL | 'equal' |
AUTOFILTER_COLUMN_RULE_NOTEQUAL | 'notEqual' |
AUTOFILTER_COLUMN_RULE_GREATERTHAN | 'greaterThan' |
AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL | 'greaterThanOrEqual' |
AUTOFILTER_COLUMN_RULE_LESSTHAN | 'lessThan' |
AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL | 'lessThanOrEqual' |

View File

@ -0,0 +1,88 @@
# PHPExcel AutoFilter Reference
## Autofilter Expressions
### Dynamic Filters
Dynamic Filters are based on a dynamic comparison condition, where the value we're comparing against the cell values is variable, such as 'today'; or when we're testing against an aggregate of the cell data (e.g. 'aboveAverage'). Only a single dynamic filter can be applied to a column at a time.
![04-04-dynamic-autofilter.png](./images/04-04-dynamic-autofilter.png "")
Again, we start by specifying a Filter type, this time a DYNAMICFILTER.
```php
$columnFilter->setFilterType(
PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER
);
```
When defining the rule for a dynamic filter, we don't define a value (we can simply set that to NULL) but we do specify the dynamic filter category.
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
NULL,
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER
);
```
We also set the rule type to DYNAMICFILTER.
The valid set of dynamic filter categories is defined in the PHPExcel_Worksheet_AutoFilter_Column_Rule class, and comprises:
Operator Constant | Value |
-----------------------------------------|----------------|
AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY | 'yesterday' |
AUTOFILTER_RULETYPE_DYNAMIC_TODAY | 'today' |
AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW | 'tomorrow' |
AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE | 'yearToDate' |
AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR | 'thisYear' |
AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER | 'thisQuarter' |
AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH | 'thisMonth' |
AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK | 'thisWeek' |
AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR | 'lastYear' |
AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER | 'lastQuarter' |
AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH | 'lastMonth' |
AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK | 'lastWeek' |
AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR | 'nextYear' |
AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER | 'nextQuarter' |
AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH | 'nextMonth' |
AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK | 'nextWeek' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1 | 'M1' |
AUTOFILTER_RULETYPE_DYNAMIC_JANUARY | 'M1' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2 | 'M2' |
AUTOFILTER_RULETYPE_DYNAMIC_FEBRUARY | 'M2' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3 | 'M3' |
AUTOFILTER_RULETYPE_DYNAMIC_MARCH | 'M3' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4 | 'M4' |
AUTOFILTER_RULETYPE_DYNAMIC_APRIL | 'M4' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5 | 'M5' |
AUTOFILTER_RULETYPE_DYNAMIC_MAY | 'M5' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6 | 'M6' |
AUTOFILTER_RULETYPE_DYNAMIC_JUNE | 'M6' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7 | 'M7' |
AUTOFILTER_RULETYPE_DYNAMIC_JULY | 'M7' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8 | 'M8' |
AUTOFILTER_RULETYPE_DYNAMIC_AUGUST | 'M8' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9 | 'M9' |
AUTOFILTER_RULETYPE_DYNAMIC_SEPTEMBER | 'M9' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10 | 'M10' |
AUTOFILTER_RULETYPE_DYNAMIC_OCTOBER | 'M10' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11 | 'M11' |
AUTOFILTER_RULETYPE_DYNAMIC_NOVEMBER | 'M11' |
AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12 | 'M12' |
AUTOFILTER_RULETYPE_DYNAMIC_DECEMBER | 'M12' |
AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1 | 'Q1' |
AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2 | 'Q2' |
AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3 | 'Q3' |
AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4 | 'Q4' |
AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE | 'aboveAverage' |
AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE | 'belowAverage' |
We can only apply a single Dynamic Filter rule to a column at a time.

View File

@ -0,0 +1,69 @@
# PHPExcel AutoFilter Reference
## Autofilter Expressions
### Top Ten Filters
Top Ten Filters are similar to Dynamic Filters in that they are based on a summarisation of the actual data values in the cells. However, unlike Dynamic Filters where you can only select a single option, Top Ten Filters allow you to select based on a number of criteria:
![04-05-custom-topten-1.png](./images/04-05-topten-autofilter-1.png "")
![04-05-custom-topten-2.png](./images/04-05-topten-autofilter-2.png "")
You can identify whether you want the top (highest) or bottom (lowest) values.You can identify how many values you wish to select in the filterYou can identify whether this should be a percentage or a number of items.
Like Dynamic Filters, only a single Top Ten filter can be applied to a column at a time.
We start by specifying a Filter type, this time a DYNAMICFILTER.
```php
$columnFilter->setFilterType(
PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER
);
```
Then we create the rule:
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT,
5,
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER
);
```
This will filter the Top 5 percent of values in the column.
To specify the lowest (bottom 2 values), we would specify a rule of:
```php
$columnFilter->createRule()
->setRule(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE,
5,
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM
)
->setRuleType(
PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER
);
```
The option values for TopTen Filters top/bottom value/percent are all defined in the PHPExcel_Worksheet_AutoFilter_Column_Rule class, and comprise:
Operator Constant | Value |
---------------------------------------|-------------|
AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE | 'byValue' |
AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT | 'byPercent' |
and
Operator Constant | Value |
-------------------------------------|----------|
AUTOFILTER_COLUMN_RULE_TOPTEN_TOP | 'top' |
AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM | 'bottom' |

View File

@ -0,0 +1,42 @@
# PHPExcel AutoFilter Reference
## Executing an AutoFilter
When an autofilter is applied in MS Excel, it sets the row hidden/visible flags for each row of the autofilter area based on the selected criteria, so that only those rows that match the filter criteria are displayed.
PHPExcel will not execute the equivalent function automatically when you set or change a filter expression, but only when the file is saved.
### Applying the Filter
If you wish to execute your filter from within a script, you need to do this manually. You can do this using the autofilters showHideRows() method.
```php
$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter();
$autoFilter->showHideRows();
```
This will set all rows that match the filter criteria to visible, while hiding all other rows within the autofilter area.
### Displaying Filtered Rows
Simply looping through the rows in an autofilter area will still access ever row, whether it matches the filter criteria or not. To selectively access only the filtered rows, you need to test each rows visibility settings.
```php
foreach ($objPHPExcel->getActiveSheet()->getRowIterator() as $row) {
if ($objPHPExcel->getActiveSheet()
->getRowDimension($row->getRowIndex())->getVisible()) {
echo ' Row number - ' , $row->getRowIndex() , ' ';
echo $objPHPExcel->getActiveSheet()
->getCell(
'C'.$row->getRowIndex()
)
->getValue(), ' ';
echo $objPHPExcel->getActiveSheet()
->getCell(
'D'.$row->getRowIndex()
)->getFormattedValue(), ' ';
echo EOL;
}
}
```

View File

@ -0,0 +1,7 @@
# PHPExcel AutoFilter Reference
## AutoFilter Sorting
In MS Excel, Autofiltering also allows the rows to be sorted. This feature is ***not*** supported by PHPExcel.

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Some files were not shown because too many files have changed in this diff Show More