class PHPExcel_Calculation_Database

PHPExcelCalculationDatabase

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Methods

static float
DAVERAGE(mixed[] $database, string|integer $field, mixed[] $criteria)

DAVERAGE

static integer
DCOUNT(mixed[] $database, string|integer $field, mixed[] $criteria)

DCOUNT

static integer
DCOUNTA(mixed[] $database, string|integer $field, mixed[] $criteria)

DCOUNTA

static mixed
DGET(mixed[] $database, string|integer $field, mixed[] $criteria)

DGET

static float
DMAX(mixed[] $database, string|integer $field, mixed[] $criteria)

DMAX

static float
DMIN(mixed[] $database, string|integer $field, mixed[] $criteria)

DMIN

static float
DPRODUCT(mixed[] $database, string|integer $field, mixed[] $criteria)

DPRODUCT

static float
DSTDEV(mixed[] $database, string|integer $field, mixed[] $criteria)

DSTDEV

static float
DSTDEVP(mixed[] $database, string|integer $field, mixed[] $criteria)

DSTDEVP

static float
DSUM(mixed[] $database, string|integer $field, mixed[] $criteria)

DSUM

static float
DVAR(mixed[] $database, string|integer $field, mixed[] $criteria)

DVAR

static float
DVARP(mixed[] $database, string|integer $field, mixed[] $criteria)

DVARP

Details

at line 205
static float DAVERAGE(mixed[] $database, string|integer $field, mixed[] $criteria)

DAVERAGE

Averages the values in a column of a list or database that match conditions you specify.

Excel Function: DAVERAGE(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 253
static integer DCOUNT(mixed[] $database, string|integer $field, mixed[] $criteria)

DCOUNT

Counts the cells that contain numbers in a column of a list or database that match conditions that you specify.

Excel Function: DCOUNT(database,[field],criteria)

Excel Function: DAVERAGE(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

integer

at line 297
static integer DCOUNTA(mixed[] $database, string|integer $field, mixed[] $criteria)

DCOUNTA

Counts the nonblank cells in a column of a list or database that match conditions that you specify.

Excel Function: DCOUNTA(database,[field],criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

integer

at line 347
static mixed DGET(mixed[] $database, string|integer $field, mixed[] $criteria)

DGET

Extracts a single value from a column of a list or database that matches conditions that you specify.

Excel Function: DGET(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 392
static float DMAX(mixed[] $database, string|integer $field, mixed[] $criteria)

DMAX

Returns the largest number in a column of a list or database that matches conditions you that specify.

Excel Function: DMAX(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 434
static float DMIN(mixed[] $database, string|integer $field, mixed[] $criteria)

DMIN

Returns the smallest number in a column of a list or database that matches conditions you that specify.

Excel Function: DMIN(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 475
static float DPRODUCT(mixed[] $database, string|integer $field, mixed[] $criteria)

DPRODUCT

Multiplies the values in a column of a list or database that match conditions that you specify.

Excel Function: DPRODUCT(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 517
static float DSTDEV(mixed[] $database, string|integer $field, mixed[] $criteria)

DSTDEV

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.

Excel Function: DSTDEV(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 559
static float DSTDEVP(mixed[] $database, string|integer $field, mixed[] $criteria)

DSTDEVP

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.

Excel Function: DSTDEVP(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 600
static float DSUM(mixed[] $database, string|integer $field, mixed[] $criteria)

DSUM

Adds the numbers in a column of a list or database that match conditions that you specify.

Excel Function: DSUM(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 642
static float DVAR(mixed[] $database, string|integer $field, mixed[] $criteria)

DVAR

Estimates the variance 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.

Excel Function: DVAR(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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

at line 684
static float DVARP(mixed[] $database, string|integer $field, mixed[] $criteria)

DVARP

Calculates the variance 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.

Excel Function: DVARP(database,field,criteria)

Parameters

mixed[] $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.
string|integer $field Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or 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.
mixed[] $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