Doc Block changes

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@87638 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-03-11 17:58:38 +00:00
parent 953b1e82fb
commit 891981928d
44 changed files with 1931 additions and 1790 deletions

View File

@ -55,12 +55,12 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -77,11 +77,11 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
/**
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
*/
public function isDataSet($pCoord) {
// Check if the requested entry is the current object, or exists in the cache
@ -140,10 +140,10 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
/**
* Delete a cell in cache identified by coordinate address
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord) {
// Delete the entry from APC
@ -155,9 +155,9 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent);
@ -221,10 +221,10 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
if (!function_exists('apc_store')) {

View File

@ -36,39 +36,39 @@
class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Parent worksheet
* Parent worksheet
*
* @var PHPExcel_Worksheet
* @var PHPExcel_Worksheet
*/
protected $_parent;
/**
* The currently active Cell
* The currently active Cell
*
* @var PHPExcel_Cell
* @var PHPExcel_Cell
*/
protected $_currentObject = null;
/**
* Coordinate address of the currently active Cell
* Coordinate address of the currently active Cell
*
* @var string
* @var string
*/
protected $_currentObjectID = null;
/**
* Flag indicating whether the currently active Cell requires saving
* Flag indicating whether the currently active Cell requires saving
*
* @var boolean
* @var boolean
*/
protected $_currentCellIsDirty = true;
/**
* An array of cells or cell pointers for the worksheet cells held in this cache,
* An array of cells or cell pointers for the worksheet cells held in this cache,
* and indexed by their coordinate address within the worksheet
*
* @var array of mixed
* @var array of mixed
*/
protected $_cellCache = array();
@ -82,10 +82,10 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return boolean
*/
public function isDataSet($pCoord) {
if ($pCoord === $this->_currentObjectID) {
@ -97,11 +97,11 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Add or Update a cell in cache
* Add or Update a cell in cache
*
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function updateCacheData(PHPExcel_Cell $cell) {
return $this->addCacheData($cell->getCoordinate(),$cell);
@ -109,10 +109,10 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Delete a cell in cache identified by coordinate address
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) {
@ -129,9 +129,9 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Get a list of all cell addresses currently held in cache
* Get a list of all cell addresses currently held in cache
*
* @return array of string
* @return array of string
*/
public function getCellList() {
return array_keys($this->_cellCache);
@ -139,9 +139,9 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Sort the list of all cell addresses currently held in cache by row and column
* Sort the list of all cell addresses currently held in cache by row and column
*
* @return void
* @return void
*/
public function getSortedCellList() {
$sortKeys = array();
@ -215,9 +215,9 @@ class PHPExcel_CachedObjectStorage_CacheBase {
}
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
$this->_parent = $parent;
@ -228,10 +228,10 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
return true;

View File

@ -58,12 +58,12 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -110,9 +110,9 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent);

View File

@ -36,76 +36,76 @@
interface PHPExcel_CachedObjectStorage_ICache
{
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell);
/**
* Add or Update a cell in cache
* Add or Update a cell in cache
*
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function updateCacheData(PHPExcel_Cell $cell);
/**
* Fetch a cell from cache identified by coordinate address
* Fetch a cell from cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to retrieve
* @return PHPExcel_Cell Cell that was found, or null if not found
* @throws Exception
* @param string $pCoord Coordinate address of the cell to retrieve
* @return PHPExcel_Cell Cell that was found, or null if not found
* @throws Exception
*/
public function getCacheData($pCoord);
/**
* Delete a cell in cache identified by coordinate address
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord);
/**
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
*/
public function isDataSet($pCoord);
/**
* Get a list of all cell addresses currently held in cache
* Get a list of all cell addresses currently held in cache
*
* @return array of string
* @return array of string
*/
public function getCellList();
/**
* Get the list of all cell addresses currently held in cache sorted by column and row
* Get the list of all cell addresses currently held in cache sorted by column and row
*
* @return void
* @return void
*/
public function getSortedCellList();
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent);
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable();

View File

@ -47,12 +47,12 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -110,10 +110,10 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
if (!function_exists('igbinary_serialize')) {

View File

@ -60,12 +60,12 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -82,11 +82,11 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
/**
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
*/
public function isDataSet($pCoord) {
// Check if the requested entry is the current object, or exists in the cache
@ -145,10 +145,10 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
/**
* Delete a cell in cache identified by coordinate address
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord) {
// Delete the entry from Memcache
@ -160,9 +160,9 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent);
@ -238,10 +238,10 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
} // function __destruct()
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
if (!function_exists('memcache_add')) {

View File

@ -36,12 +36,12 @@
class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
$this->_cellCache[$pCoord] = $cell;

View File

@ -47,12 +47,12 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {

View File

@ -47,12 +47,12 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {

View File

@ -57,12 +57,12 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -109,9 +109,9 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent);

View File

@ -51,12 +51,12 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -107,10 +107,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
/**
* Is a value set for an indexed cell?
* Is a value set for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return boolean
*/
public function isDataSet($pCoord) {
if ($pCoord === $this->_currentObjectID) {
@ -131,10 +131,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
/**
* Delete a cell in cache identified by coordinate address
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) {
@ -152,9 +152,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
/**
* Get a list of all cell addresses currently held in cache
* Get a list of all cell addresses currently held in cache
*
* @return array of string
* @return array of string
*/
public function getCellList() {
$query = "SELECT id FROM kvp_".$this->_TableName;
@ -172,9 +172,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
// Get a new id for the new table name
@ -222,10 +222,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
if (!function_exists('sqlite_open')) {

View File

@ -55,12 +55,12 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -112,8 +112,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
/**
* Is a value set for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return boolean
*/
public function isDataSet($pCoord) {
if ($pCoord === $this->_currentObjectID) {
@ -136,8 +136,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
/**
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) {
@ -156,9 +156,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
/**
* Get a list of all cell addresses currently held in cache
* Get a list of all cell addresses currently held in cache
*
* @return array of string
* @return array of string
*/
public function getCellList() {
$query = "SELECT id FROM kvp_".$this->_TableName;
@ -176,9 +176,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
// Get a new id for the new table name
@ -229,10 +229,10 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
if (!class_exists('SQLite3')) {

View File

@ -64,12 +64,12 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
/**
* Add or Update a cell in cache identified by coordinate address
* Add or Update a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
* @param string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update
* @return void
* @throws Exception
*/
public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
@ -86,11 +86,11 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
/**
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
*
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
* @param string $pCoord Coordinate address of the cell to check
* @return void
* @return boolean
*/
public function isDataSet($pCoord) {
// Check if the requested entry is the current object, or exists in the cache
@ -151,10 +151,10 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
/**
* Delete a cell in cache identified by coordinate address
* Delete a cell in cache identified by coordinate address
*
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
* @param string $pCoord Coordinate address of the cell to delete
* @throws Exception
*/
public function deleteCacheData($pCoord) {
// Delete the entry from Wincache
@ -166,9 +166,9 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
/**
* Clone the cell collection
* Clone the cell collection
*
* @return void
* @return void
*/
public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent);
@ -233,10 +233,10 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
/**
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build
*
* @return boolean
* @return boolean
*/
public static function cacheMethodIsAvailable() {
if (!function_exists('wincache_ucache_add')) {

View File

@ -61,8 +61,8 @@ if (!defined('CALCULATION_REGEXP_CELLREF')) {
*/
class PHPExcel_Calculation {
/** Constants */
/** Regular Expressions */
/** Constants */
/** Regular Expressions */
// Numeric operand
const CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?';
// String operand
@ -79,7 +79,7 @@ class PHPExcel_Calculation {
const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?';
/** constants */
/** constants */
const RETURN_ARRAY_AS_ERROR = 'error';
const RETURN_ARRAY_AS_VALUE = 'value';
const RETURN_ARRAY_AS_ARRAY = 'array';
@ -88,47 +88,47 @@ class PHPExcel_Calculation {
/**
* Instance of this class
* Instance of this class
*
* @access private
* @var PHPExcel_Calculation
* @access private
* @var PHPExcel_Calculation
*/
private static $_instance;
/**
* Calculation cache
* Calculation cache
*
* @access private
* @var array
* @access private
* @var array
*/
private static $_calculationCache = array ();
/**
* Calculation cache enabled
* Calculation cache enabled
*
* @access private
* @var boolean
* @access private
* @var boolean
*/
private static $_calculationCacheEnabled = true;
/**
* Calculation cache expiration time
* Calculation cache expiration time
*
* @access private
* @var float
* @access private
* @var float
*/
private static $_calculationCacheExpirationTime = 15;
/**
* List of operators that can be used within formulae
* The true/false value indicates whether it is a binary operator or a unary operator
* List of operators that can be used within formulae
* The true/false value indicates whether it is a binary operator or a unary operator
*
* @access private
* @var array
* @access private
* @var array
*/
private static $_operators = array('+' => true, '-' => true, '*' => true, '/' => true,
'^' => true, '&' => true, '%' => false, '~' => false,
@ -138,10 +138,10 @@ class PHPExcel_Calculation {
/**
* List of binary operators (those that expect two operands)
* List of binary operators (those that expect two operands)
*
* @access private
* @var array
* @access private
* @var array
*/
private static $_binaryOperators = array('+' => true, '-' => true, '*' => true, '/' => true,
'^' => true, '&' => true, '>' => true, '<' => true,
@ -150,63 +150,63 @@ class PHPExcel_Calculation {
);
/**
* Flag to determine how formula errors should be handled
* Flag to determine how formula errors should be handled
* If true, then a user error will be triggered
* If false, then an exception will be thrown
*
* @access public
* @var boolean
* @access public
* @var boolean
*
*/
public $suppressFormulaErrors = false;
/**
* Error message for any error that was raised/thrown by the calculation engine
* Error message for any error that was raised/thrown by the calculation engine
*
* @access public
* @var string
* @access public
* @var string
*
*/
public $formulaError = null;
/**
* Flag to determine whether a debug log should be generated by the calculation engine
* Flag to determine whether a debug log should be generated by the calculation engine
* If true, then a debug log will be generated
* If false, then a debug log will not be generated
*
* @access public
* @var boolean
* @access public
* @var boolean
*
*/
public $writeDebugLog = false;
/**
* Flag to determine whether a debug log should be echoed by the calculation engine
* Flag to determine whether a debug log should be echoed by the calculation engine
* If true, then a debug log will be echoed
* If false, then a debug log will not be echoed
* A debug log can only be echoed if it is generated
* A debug log can only be echoed if it is generated
*
* @access public
* @var boolean
* @access public
* @var boolean
*
*/
public $echoDebugLog = false;
/**
* An array of the nested cell references accessed by the calculation engine, used for the debug log
* An array of the nested cell references accessed by the calculation engine, used for the debug log
*
* @access private
* @var array of string
* @access private
* @var array of string
*
*/
private $debugLogStack = array();
/**
* The debug log generated by the calculation engine
* The debug log generated by the calculation engine
*
* @access public
* @var array of string
* @access public
* @var array of string
*
*/
public $debugLog = array();
@ -1704,10 +1704,10 @@ class PHPExcel_Calculation {
}
/**
* Get an instance of this class
* Get an instance of this class
*
* @access public
* @return PHPExcel_Calculation
* @access public
* @return PHPExcel_Calculation
*/
public static function getInstance() {
if (!isset(self::$_instance) || (self::$_instance === NULL)) {
@ -1719,11 +1719,11 @@ class PHPExcel_Calculation {
/**
* Flush the calculation cache for any existing instance of this class
* Flush the calculation cache for any existing instance of this class
* but only if a PHPExcel_Calculation instance exists
*
* @access public
* @return null
* @access public
* @return null
*/
public static function flushInstance() {
if (isset(self::$_instance) && (self::$_instance !== NULL)) {
@ -1733,10 +1733,10 @@ class PHPExcel_Calculation {
/**
* __clone implementation. Cloning should not be allowed in a Singleton!
* __clone implementation. Cloning should not be allowed in a Singleton!
*
* @access public
* @throws Exception
* @access public
* @throws Exception
*/
public final function __clone() {
throw new Exception ('Cloning a Singleton is not allowed!');
@ -1744,31 +1744,31 @@ class PHPExcel_Calculation {
/**
* Return the locale-specific translation of TRUE
* Return the locale-specific translation of TRUE
*
* @access public
* @return string locale-specific translation of TRUE
* @access public
* @return string locale-specific translation of TRUE
*/
public static function getTRUE() {
return self::$_localeBoolean['TRUE'];
}
/**
* Return the locale-specific translation of FALSE
* Return the locale-specific translation of FALSE
*
* @access public
* @return string locale-specific translation of FALSE
* @access public
* @return string locale-specific translation of FALSE
*/
public static function getFALSE() {
return self::$_localeBoolean['FALSE'];
}
/**
* Set the Array Return Type (Array or Value of first element in the array)
* Set the Array Return Type (Array or Value of first element in the array)
*
* @access public
* @param string $returnType Array return type
* @return boolean Success or failure
* @access public
* @param string $returnType Array return type
* @return boolean Success or failure
*/
public static function setArrayReturnType($returnType) {
if (($returnType == self::RETURN_ARRAY_AS_VALUE) ||
@ -1782,10 +1782,10 @@ class PHPExcel_Calculation {
/**
* Return the Array Return Type (Array or Value of first element in the array)
* Return the Array Return Type (Array or Value of first element in the array)
*
* @access public
* @return string $returnType Array return type
* @access public
* @return string $returnType Array return type
*/
public static function getArrayReturnType() {
return self::$returnArrayAsType;
@ -1793,10 +1793,10 @@ class PHPExcel_Calculation {
/**
* Is calculation caching enabled?
* Is calculation caching enabled?
*
* @access public
* @return boolean
* @access public
* @return boolean
*/
public function getCalculationCacheEnabled() {
return self::$_calculationCacheEnabled;
@ -1804,10 +1804,10 @@ class PHPExcel_Calculation {
/**
* Enable/disable calculation cache
* Enable/disable calculation cache
*
* @access public
* @param boolean $pValue
* @access public
* @param boolean $pValue
*/
public function setCalculationCacheEnabled($pValue = true) {
self::$_calculationCacheEnabled = $pValue;
@ -1816,7 +1816,7 @@ class PHPExcel_Calculation {
/**
* Enable calculation cache
* Enable calculation cache
*/
public function enableCalculationCache() {
$this->setCalculationCacheEnabled(true);
@ -1824,7 +1824,7 @@ class PHPExcel_Calculation {
/**
* Disable calculation cache
* Disable calculation cache
*/
public function disableCalculationCache() {
$this->setCalculationCacheEnabled(false);
@ -1832,7 +1832,7 @@ class PHPExcel_Calculation {
/**
* Clear calculation cache
* Clear calculation cache
*/
public function clearCalculationCache() {
self::$_calculationCache = array();
@ -1840,9 +1840,9 @@ class PHPExcel_Calculation {
/**
* Get calculation cache expiration time
* Get calculation cache expiration time
*
* @return float
* @return float
*/
public function getCalculationCacheExpirationTime() {
return self::$_calculationCacheExpirationTime;
@ -1850,9 +1850,9 @@ class PHPExcel_Calculation {
/**
* Set calculation cache expiration time
* Set calculation cache expiration time
*
* @param float $pValue
* @param float $pValue
*/
public function setCalculationCacheExpirationTime($pValue = 15) {
self::$_calculationCacheExpirationTime = $pValue;
@ -1862,9 +1862,9 @@ class PHPExcel_Calculation {
/**
* Get the currently defined locale code
* Get the currently defined locale code
*
* @return string
* @return string
*/
public function getLocale() {
return self::$_localeLanguage;
@ -1872,9 +1872,9 @@ class PHPExcel_Calculation {
/**
* Set the locale code
* Set the locale code
*
* @return boolean
* @return boolean
*/
public function setLocale($locale='en_us') {
// Identify our locale and language
@ -2069,10 +2069,10 @@ class PHPExcel_Calculation {
/**
* Wrap string values in quotes
* Wrap string values in quotes
*
* @param mixed $value
* @return mixed
* @param mixed $value
* @return mixed
*/
public static function _wrapResult($value) {
if (is_string($value)) {
@ -2093,10 +2093,10 @@ class PHPExcel_Calculation {
/**
* Remove quotes used as a wrapper to identify string values
* Remove quotes used as a wrapper to identify string values
*
* @param mixed $value
* @return mixed
* @param mixed $value
* @return mixed
*/
public static function _unwrapResult($value) {
if (is_string($value)) {
@ -2114,13 +2114,13 @@ class PHPExcel_Calculation {
/**
* Calculate cell value (using formula from a cell ID)
* Retained for backward compatibility
* Calculate cell value (using formula from a cell ID)
* Retained for backward compatibility
*
* @access public
* @param PHPExcel_Cell $pCell Cell to calculate
* @return mixed
* @throws Exception
* @access public
* @param PHPExcel_Cell $pCell Cell to calculate
* @return mixed
* @throws Exception
*/
public function calculate(PHPExcel_Cell $pCell = null) {
try {
@ -2132,13 +2132,13 @@ class PHPExcel_Calculation {
/**
* Calculate the value of a cell formula
* Calculate the value of a cell formula
*
* @access public
* @param PHPExcel_Cell $pCell Cell to calculate
* @param Boolean $resetLog Flag indicating whether the debug log should be reset or not
* @return mixed
* @throws Exception
* @access public
* @param PHPExcel_Cell $pCell Cell to calculate
* @param Boolean $resetLog Flag indicating whether the debug log should be reset or not
* @return mixed
* @throws Exception
*/
public function calculateCellValue(PHPExcel_Cell $pCell = null, $resetLog = true) {
if ($resetLog) {
@ -2198,11 +2198,11 @@ class PHPExcel_Calculation {
/**
* Validate and parse a formula string
* Validate and parse a formula string
*
* @param string $formula Formula to parse
* @return array
* @throws Exception
* @param string $formula Formula to parse
* @return array
* @throws Exception
*/
public function parseFormula($formula) {
// Basic validation that this is indeed a formula
@ -2218,11 +2218,11 @@ class PHPExcel_Calculation {
/**
* Calculate the value of a formula
* Calculate the value of a formula
*
* @param string $formula Formula to parse
* @return mixed
* @throws Exception
* @param string $formula Formula to parse
* @return mixed
* @throws Exception
*/
public function calculateFormula($formula, $cellID=null, PHPExcel_Cell $pCell = null) {
// Initialise the logging settings
@ -2248,13 +2248,13 @@ class PHPExcel_Calculation {
/**
* Parse a cell formula and calculate its value
* Parse a cell formula and calculate its value
*
* @param string $formula The formula to parse and calculate
* @param string $cellID The ID (e.g. A3) of the cell that we are calculating
* @param PHPExcel_Cell $pCell Cell to calculate
* @return mixed
* @throws Exception
* @param string $formula The formula to parse and calculate
* @param string $cellID The ID (e.g. A3) of the cell that we are calculating
* @param PHPExcel_Cell $pCell Cell to calculate
* @return mixed
* @throws Exception
*/
public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pCell = null) {
// echo '<b>'.$cellID.'</b><br />';
@ -2341,11 +2341,11 @@ class PHPExcel_Calculation {
/**
* Ensure that paired matrix operands are both matrices and of the same size
* Ensure that paired matrix operands are both matrices and of the same size
*
* @param mixed &$operand1 First matrix operand
* @param mixed &$operand2 Second matrix operand
* @param integer $resize Flag indicating whether the matrices should be resized to match
* @param mixed &$operand1 First matrix operand
* @param mixed &$operand2 Second matrix operand
* @param integer $resize Flag indicating whether the matrices should be resized to match
* and (if so), whether the smaller dimension should grow or the
* larger should shrink.
* 0 = no resize
@ -2383,10 +2383,10 @@ class PHPExcel_Calculation {
/**
* Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0
* Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0
*
* @param mixed &$matrix matrix operand
* @return array An array comprising the number of rows, and number of columns
* @param mixed &$matrix matrix operand
* @return array An array comprising the number of rows, and number of columns
*/
public static function _getMatrixDimensions(&$matrix) {
$matrixRows = count($matrix);
@ -2405,10 +2405,10 @@ class PHPExcel_Calculation {
/**
* Ensure that paired matrix operands are both matrices of the same size
* Ensure that paired matrix operands are both matrices of the same size
*
* @param mixed &$matrix1 First matrix operand
* @param mixed &$matrix2 Second matrix operand
* @param mixed &$matrix1 First matrix operand
* @param mixed &$matrix2 Second matrix operand
*/
private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
@ -2444,10 +2444,10 @@ class PHPExcel_Calculation {
/**
* Ensure that paired matrix operands are both matrices of the same size
* Ensure that paired matrix operands are both matrices of the same size
*
* @param mixed &$matrix1 First matrix operand
* @param mixed &$matrix2 Second matrix operand
* @param mixed &$matrix1 First matrix operand
* @param mixed &$matrix2 Second matrix operand
*/
private static function _resizeMatricesExtend(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
@ -2487,10 +2487,10 @@ class PHPExcel_Calculation {
/**
* Format details of an operand for display in the log (based on operand type)
* Format details of an operand for display in the log (based on operand type)
*
* @param mixed $value First matrix operand
* @return mixed
* @param mixed $value First matrix operand
* @return mixed
*/
private function _showValue($value) {
if ($this->writeDebugLog) {
@ -2522,10 +2522,10 @@ class PHPExcel_Calculation {
/**
* Format type and details of an operand for display in the log (based on operand type)
* Format type and details of an operand for display in the log (based on operand type)
*
* @param mixed $value First matrix operand
* @return mixed
* @param mixed $value First matrix operand
* @return mixed
*/
private function _showTypeDetails($value) {
if ($this->writeDebugLog) {

View File

@ -591,21 +591,21 @@ class PHPExcel_Calculation_DateTime {
/**
* YEARFRAC
* YEARFRAC
*
* Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the
* end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations
* to assign to a specific term.
* Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the
* end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations
* to assign to a specific term.
*
* @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string
* @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string
* @param integer $method Method used for the calculation
* @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string
* @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string
* @param integer $method Method used for the calculation
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float fraction of the year
* @return float fraction of the year
*/
public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0) {
$startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate);

View File

@ -744,7 +744,7 @@ class PHPExcel_Calculation_Engineering {
*
* Returns the modified Bessel function, which is equivalent to the Bessel function evaluated for purely imaginary arguments
*
* @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office
* @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office
*
* @param float $x
* @param float $n
@ -789,7 +789,7 @@ class PHPExcel_Calculation_Engineering {
*
* Returns the Bessel function
*
* @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office
* @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office
*
* @param float $x
* @param float $n

View File

@ -135,22 +135,22 @@ class PHPExcel_Calculation_Financial {
/**
* ACCRINT
* ACCRINT
*
* Returns the discount rate for a security.
* Returns the discount rate for a security.
*
* @param mixed issue The security's issue date.
* @param mixed firstinter The security's first interest date.
* @param mixed settlement The security's settlement date.
* @param float rate The security's annual coupon rate.
* @param float par The security's par value.
* @param int basis The type of day count to use.
* @param mixed issue The security's issue date.
* @param mixed firstinter The security's first interest date.
* @param mixed settlement The security's settlement date.
* @param float rate The security's annual coupon rate.
* @param float par The security's par value.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function ACCRINT($issue, $firstinter, $settlement, $rate, $par=1000, $frequency=1, $basis=0) {
$issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue);
@ -179,21 +179,21 @@ class PHPExcel_Calculation_Financial {
/**
* ACCRINTM
* ACCRINTM
*
* Returns the discount rate for a security.
* Returns the discount rate for a security.
*
* @param mixed issue The security's issue date.
* @param mixed settlement The security's settlement date.
* @param float rate The security's annual coupon rate.
* @param float par The security's par value.
* @param int basis The type of day count to use.
* @param mixed issue The security's issue date.
* @param mixed settlement The security's settlement date.
* @param float rate The security's annual coupon rate.
* @param float par The security's par value.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function ACCRINTM($issue, $settlement, $rate, $par=1000, $basis=0) {
$issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue);
@ -472,18 +472,18 @@ class PHPExcel_Calculation_Financial {
/**
* CUMIPMT
* CUMIPMT
*
* Returns the cumulative interest paid on a loan between start_period and end_period.
* Returns the cumulative interest paid on a loan between start_period and end_period.
*
* @param float $rate Interest rate per period
* @param int $nper Number of periods
* @param float $pv Present Value
* @param int start The first period in the calculation.
* @param float $rate Interest rate per period
* @param int $nper Number of periods
* @param float $pv Present Value
* @param int start The first period in the calculation.
* Payment periods are numbered beginning with 1.
* @param int end The last period in the calculation.
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
* @param int end The last period in the calculation.
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
*/
public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate);
@ -512,18 +512,18 @@ class PHPExcel_Calculation_Financial {
/**
* CUMPRINC
* CUMPRINC
*
* Returns the cumulative principal paid on a loan between start_period and end_period.
* Returns the cumulative principal paid on a loan between start_period and end_period.
*
* @param float $rate Interest rate per period
* @param int $nper Number of periods
* @param float $pv Present Value
* @param int start The first period in the calculation.
* @param float $rate Interest rate per period
* @param int $nper Number of periods
* @param float $pv Present Value
* @param int start The first period in the calculation.
* Payment periods are numbered beginning with 1.
* @param int end The last period in the calculation.
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
* @param int end The last period in the calculation.
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
*/
public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate);
@ -552,19 +552,19 @@ class PHPExcel_Calculation_Financial {
/**
* DB
* DB
*
* Returns the depreciation of an asset for a specified period using the fixed-declining balance method.
* This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation
* Returns the depreciation of an asset for a specified period using the fixed-declining balance method.
* This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation
* (as opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the
* depreciation already deducted from the initial cost.
*
* @param float cost Initial cost of the asset.
* @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
* @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
* @param int period The period for which you want to calculate the depreciation. Period must use the same units as life.
* @param float month Number of months in the first year. If month is omitted, it defaults to 12.
* @return float
* @param float cost Initial cost of the asset.
* @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
* @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
* @param int period The period for which you want to calculate the depreciation. Period must use the same units as life.
* @param float month Number of months in the first year. If month is omitted, it defaults to 12.
* @return float
*/
public static function DB($cost, $salvage, $life, $period, $month=12) {
$cost = (float) PHPExcel_Calculation_Functions::flattenSingleValue($cost);
@ -606,17 +606,17 @@ class PHPExcel_Calculation_Financial {
/**
* DDB
* DDB
*
* Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.
* Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.
*
* @param float cost Initial cost of the asset.
* @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
* @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
* @param int period The period for which you want to calculate the depreciation. Period must use the same units as life.
* @param float factor The rate at which the balance declines.
* @param float cost Initial cost of the asset.
* @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
* @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
* @param int period The period for which you want to calculate the depreciation. Period must use the same units as life.
* @param float factor The rate at which the balance declines.
* If factor is omitted, it is assumed to be 2 (the double-declining balance method).
* @return float
* @return float
*/
public static function DDB($cost, $salvage, $life, $period, $factor=2.0) {
$cost = (float) PHPExcel_Calculation_Functions::flattenSingleValue($cost);
@ -650,23 +650,23 @@ class PHPExcel_Calculation_Financial {
/**
* DISC
* DISC
*
* Returns the discount rate for a security.
* Returns the discount rate for a security.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param int price The security's price per $100 face value.
* @param int redemption the security's redemption value per $100 face value.
* @param int basis The type of day count to use.
* @param int price The security's price per $100 face value.
* @param int redemption the security's redemption value per $100 face value.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function DISC($settlement, $maturity, $price, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -824,23 +824,23 @@ class PHPExcel_Calculation_Financial {
/**
* INTRATE
* INTRATE
*
* Returns the interest rate for a fully invested security.
* Returns the interest rate for a fully invested security.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param int investment The amount invested in the security.
* @param int redemption The amount to be received at maturity.
* @param int basis The type of day count to use.
* @param int investment The amount invested in the security.
* @param int redemption The amount to be received at maturity.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -867,17 +867,17 @@ class PHPExcel_Calculation_Financial {
/**
* IPMT
* IPMT
*
* Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
* Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
*
* @param float $rate Interest rate per period
* @param int $per Period for which we want to find the interest
* @param int $nper Number of periods
* @param float $pv Present Value
* @param float $fv Future Value
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
* @param float $rate Interest rate per period
* @param int $per Period for which we want to find the interest
* @param int $nper Number of periods
* @param float $pv Present Value
* @param float $fv Future Value
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
*/
public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate);
@ -1040,12 +1040,12 @@ class PHPExcel_Calculation_Financial {
*
* Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.
*
* @param float $rate Interest rate per period
* @param int $pmt Periodic payment (annuity)
* @param float $pv Present Value
* @param float $fv Future Value
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
* @param float $rate Interest rate per period
* @param int $pmt Periodic payment (annuity)
* @param float $pv Present Value
* @param float $fv Future Value
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
*/
public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate);
@ -1138,17 +1138,17 @@ class PHPExcel_Calculation_Financial {
/**
* PPMT
* PPMT
*
* Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
* Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
*
* @param float $rate Interest rate per period
* @param int $per Period for which we want to find the interest
* @param int $nper Number of periods
* @param float $pv Present Value
* @param float $fv Future Value
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
* @param float $rate Interest rate per period
* @param int $per Period for which we want to find the interest
* @param int $nper Number of periods
* @param float $pv Present Value
* @param float $fv Future Value
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float
*/
public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate);
@ -1214,23 +1214,23 @@ class PHPExcel_Calculation_Financial {
/**
* PRICEDISC
* PRICEDISC
*
* Returns the price per $100 face value of a discounted security.
* Returns the price per $100 face value of a discounted security.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param int discount The security's discount rate.
* @param int redemption The security's redemption value per $100 face value.
* @param int basis The type of day count to use.
* @param int discount The security's discount rate.
* @param int redemption The security's redemption value per $100 face value.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1257,24 +1257,24 @@ class PHPExcel_Calculation_Financial {
/**
* PRICEMAT
* PRICEMAT
*
* Returns the price per $100 face value of a security that pays interest at maturity.
* Returns the price per $100 face value of a security that pays interest at maturity.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security's settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param mixed issue The security's issue date.
* @param int rate The security's interest rate at date of issue.
* @param int yield The security's annual yield.
* @param int basis The type of day count to use.
* @param mixed issue The security's issue date.
* @param int rate The security's interest rate at date of issue.
* @param int yield The security's annual yield.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1399,23 +1399,23 @@ class PHPExcel_Calculation_Financial {
/**
* RECEIVED
* RECEIVED
*
* Returns the price per $100 face value of a discounted security.
* Returns the price per $100 face value of a discounted security.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param int investment The amount invested in the security.
* @param int discount The security's discount rate.
* @param int basis The type of day count to use.
* @param int investment The amount invested in the security.
* @param int discount The security's discount rate.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1496,16 +1496,16 @@ class PHPExcel_Calculation_Financial {
/**
* TBILLEQ
* TBILLEQ
*
* Returns the bond-equivalent yield for a Treasury bill.
* Returns the bond-equivalent yield for a Treasury bill.
*
* @param mixed settlement The Treasury bill's settlement date.
* @param mixed settlement The Treasury bill's settlement date.
* The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
* @param mixed maturity The Treasury bill's maturity date.
* @param mixed maturity The Treasury bill's maturity date.
* The maturity date is the date when the Treasury bill expires.
* @param int discount The Treasury bill's discount rate.
* @return float
* @param int discount The Treasury bill's discount rate.
* @return float
*/
public static function TBILLEQ($settlement, $maturity, $discount) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1534,16 +1534,16 @@ class PHPExcel_Calculation_Financial {
/**
* TBILLPRICE
* TBILLPRICE
*
* Returns the yield for a Treasury bill.
* Returns the yield for a Treasury bill.
*
* @param mixed settlement The Treasury bill's settlement date.
* @param mixed settlement The Treasury bill's settlement date.
* The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
* @param mixed maturity The Treasury bill's maturity date.
* @param mixed maturity The Treasury bill's maturity date.
* The maturity date is the date when the Treasury bill expires.
* @param int discount The Treasury bill's discount rate.
* @return float
* @param int discount The Treasury bill's discount rate.
* @return float
*/
public static function TBILLPRICE($settlement, $maturity, $discount) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1586,16 +1586,16 @@ class PHPExcel_Calculation_Financial {
/**
* TBILLYIELD
* TBILLYIELD
*
* Returns the yield for a Treasury bill.
* Returns the yield for a Treasury bill.
*
* @param mixed settlement The Treasury bill's settlement date.
* @param mixed settlement The Treasury bill's settlement date.
* The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
* @param mixed maturity The Treasury bill's maturity date.
* @param mixed maturity The Treasury bill's maturity date.
* The maturity date is the date when the Treasury bill expires.
* @param int price The Treasury bill's price per $100 face value.
* @return float
* @param int price The Treasury bill's price per $100 face value.
* @return float
*/
public static function TBILLYIELD($settlement, $maturity, $price) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1672,18 +1672,18 @@ class PHPExcel_Calculation_Financial {
/**
* XNPV
* XNPV
*
* Returns the net present value for a schedule of cash flows that is not necessarily periodic.
* To calculate the net present value for a series of cash flows that is periodic, use the NPV function.
* Returns the net present value for a schedule of cash flows that is not necessarily periodic.
* To calculate the net present value for a series of cash flows that is periodic, use the NPV function.
*
* Excel Function:
* Excel Function:
* =XNPV(rate,values,dates)
*
* @param float $rate The discount rate to apply to the cash flows.
* @param array of float $values A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value.
* @param array of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order.
* @return float
* @param float $rate The discount rate to apply to the cash flows.
* @param array of float $values A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value.
* @param array of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order.
* @return float
*/
public static function XNPV($rate, $values, $dates) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate);
@ -1705,23 +1705,23 @@ class PHPExcel_Calculation_Financial {
/**
* YIELDDISC
* YIELDDISC
*
* Returns the annual yield of a security that pays interest at maturity.
* Returns the annual yield of a security that pays interest at maturity.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security's settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param int price The security's price per $100 face value.
* @param int redemption The security's redemption value per $100 face value.
* @param int basis The type of day count to use.
* @param int price The security's price per $100 face value.
* @param int redemption The security's redemption value per $100 face value.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);
@ -1753,24 +1753,24 @@ class PHPExcel_Calculation_Financial {
/**
* YIELDMAT
* YIELDMAT
*
* Returns the annual yield of a security that pays interest at maturity.
* Returns the annual yield of a security that pays interest at maturity.
*
* @param mixed settlement The security's settlement date.
* @param mixed settlement The security's settlement date.
* The security's settlement date is the date after the issue date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date.
* @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires.
* @param mixed issue The security's issue date.
* @param int rate The security's interest rate at date of issue.
* @param int price The security's price per $100 face value.
* @param int basis The type of day count to use.
* @param mixed issue The security's issue date.
* @param int rate The security's interest rate at date of issue.
* @param int price The security's price per $100 face value.
* @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360
* 1 Actual/actual
* 2 Actual/360
* 3 Actual/365
* 4 European 30/360
* @return float
* @return float
*/
public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);

View File

@ -69,26 +69,26 @@ class PHPExcel_Calculation_Functions {
/**
* Compatibility mode to use for error checking and responses
* Compatibility mode to use for error checking and responses
*
* @access private
* @var string
* @access private
* @var string
*/
protected static $compatibilityMode = self::COMPATIBILITY_EXCEL;
/**
* Data Type to use when returning date values
* Data Type to use when returning date values
*
* @access private
* @var string
* @access private
* @var string
*/
protected static $ReturnDateType = self::RETURNDATE_EXCEL;
/**
* List of error codes
* List of error codes
*
* @access private
* @var array
* @access private
* @var array
*/
protected static $_errorCodes = array( 'null' => '#NULL!',
'divisionbyzero' => '#DIV/0!',
@ -102,16 +102,16 @@ class PHPExcel_Calculation_Functions {
/**
* Set the Compatibility Mode
* Set the Compatibility Mode
*
* @access public
* @category Function Configuration
* @param string $compatibilityMode Compatibility Mode
* @access public
* @category Function Configuration
* @param string $compatibilityMode Compatibility Mode
* Permitted values are:
* PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel'
* PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric'
* PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'
* @return boolean (Success or Failure)
* @return boolean (Success or Failure)
*/
public static function setCompatibilityMode($compatibilityMode) {
if (($compatibilityMode == self::COMPATIBILITY_EXCEL) ||
@ -125,11 +125,11 @@ class PHPExcel_Calculation_Functions {
/**
* Return the current Compatibility Mode
* Return the current Compatibility Mode
*
* @access public
* @category Function Configuration
* @return string Compatibility Mode
* @access public
* @category Function Configuration
* @return string Compatibility Mode
* Possible Return values are:
* PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel'
* PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric'
@ -141,16 +141,16 @@ class PHPExcel_Calculation_Functions {
/**
* Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object)
* Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object)
*
* @access public
* @category Function Configuration
* @param string $returnDateType Return Date Format
* @access public
* @category Function Configuration
* @param string $returnDateType Return Date Format
* Permitted values are:
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P'
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O'
* PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E'
* @return boolean Success or failure
* @return boolean Success or failure
*/
public static function setReturnDateType($returnDateType) {
if (($returnDateType == self::RETURNDATE_PHP_NUMERIC) ||
@ -164,11 +164,11 @@ class PHPExcel_Calculation_Functions {
/**
* Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object)
* Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object)
*
* @access public
* @category Function Configuration
* @return string Return Date Format
* @access public
* @category Function Configuration
* @return string Return Date Format
* Possible Return values are:
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P'
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O'
@ -180,11 +180,11 @@ class PHPExcel_Calculation_Functions {
/**
* DUMMY
* DUMMY
*
* @access public
* @category Error Returns
* @return string #Not Yet Implemented
* @access public
* @category Error Returns
* @return string #Not Yet Implemented
*/
public static function DUMMY() {
return '#Not Yet Implemented';
@ -192,11 +192,11 @@ class PHPExcel_Calculation_Functions {
/**
* DIV0
* DIV0
*
* @access public
* @category Error Returns
* @return string #Not Yet Implemented
* @access public
* @category Error Returns
* @return string #Not Yet Implemented
*/
public static function DIV0() {
return self::$_errorCodes['divisionbyzero'];
@ -204,17 +204,17 @@ class PHPExcel_Calculation_Functions {
/**
* NA
* NA
*
* Excel Function:
* Excel Function:
* =NA()
*
* Returns the error value #N/A
* Returns the error value #N/A
* #N/A is the error value that means "no value is available."
*
* @access public
* @category Logical Functions
* @return string #N/A!
* @access public
* @category Logical Functions
* @return string #N/A!
*/
public static function NA() {
return self::$_errorCodes['na'];
@ -222,13 +222,13 @@ class PHPExcel_Calculation_Functions {
/**
* NaN
* NaN
*
* Returns the error value #NUM!
* Returns the error value #NUM!
*
* @access public
* @category Error Returns
* @return string #NUM!
* @access public
* @category Error Returns
* @return string #NUM!
*/
public static function NaN() {
return self::$_errorCodes['num'];
@ -236,13 +236,13 @@ class PHPExcel_Calculation_Functions {
/**
* NAME
* NAME
*
* Returns the error value #NAME?
* Returns the error value #NAME?
*
* @access public
* @category Error Returns
* @return string #NAME?
* @access public
* @category Error Returns
* @return string #NAME?
*/
public static function NAME() {
return self::$_errorCodes['name'];
@ -250,13 +250,13 @@ class PHPExcel_Calculation_Functions {
/**
* REF
* REF
*
* Returns the error value #REF!
* Returns the error value #REF!
*
* @access public
* @category Error Returns
* @return string #REF!
* @access public
* @category Error Returns
* @return string #REF!
*/
public static function REF() {
return self::$_errorCodes['reference'];
@ -264,13 +264,13 @@ class PHPExcel_Calculation_Functions {
/**
* NULL
* NULL
*
* Returns the error value #NULL!
* Returns the error value #NULL!
*
* @access public
* @category Error Returns
* @return string #REF!
* @access public
* @category Error Returns
* @return string #REF!
*/
public static function NULL() {
return self::$_errorCodes['null'];
@ -278,13 +278,13 @@ class PHPExcel_Calculation_Functions {
/**
* VALUE
* VALUE
*
* Returns the error value #VALUE!
* Returns the error value #VALUE!
*
* @access public
* @category Error Returns
* @return string #VALUE!
* @access public
* @category Error Returns
* @return string #VALUE!
*/
public static function VALUE() {
return self::$_errorCodes['value'];
@ -321,10 +321,10 @@ class PHPExcel_Calculation_Functions {
/**
* ERROR_TYPE
* ERROR_TYPE
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function ERROR_TYPE($value = '') {
$value = self::flattenSingleValue($value);
@ -341,10 +341,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_BLANK
* IS_BLANK
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_BLANK($value = NULL) {
if (!is_null($value)) {
@ -356,10 +356,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_ERR
* IS_ERR
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_ERR($value = '') {
$value = self::flattenSingleValue($value);
@ -369,10 +369,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_ERROR
* IS_ERROR
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_ERROR($value = '') {
$value = self::flattenSingleValue($value);
@ -384,10 +384,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_NA
* IS_NA
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_NA($value = '') {
$value = self::flattenSingleValue($value);
@ -397,10 +397,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_EVEN
* IS_EVEN
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_EVEN($value = NULL) {
$value = self::flattenSingleValue($value);
@ -414,10 +414,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_ODD
* IS_ODD
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_ODD($value = NULL) {
$value = self::flattenSingleValue($value);
@ -431,10 +431,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_NUMBER
* IS_NUMBER
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_NUMBER($value = NULL) {
$value = self::flattenSingleValue($value);
@ -447,10 +447,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_LOGICAL
* IS_LOGICAL
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_LOGICAL($value = NULL) {
$value = self::flattenSingleValue($value);
@ -460,10 +460,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_TEXT
* IS_TEXT
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_TEXT($value = NULL) {
$value = self::flattenSingleValue($value);
@ -473,10 +473,10 @@ class PHPExcel_Calculation_Functions {
/**
* IS_NONTEXT
* IS_NONTEXT
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function IS_NONTEXT($value = NULL) {
return !self::IS_TEXT($value);
@ -484,9 +484,9 @@ class PHPExcel_Calculation_Functions {
/**
* VERSION
* VERSION
*
* @return string Version information
* @return string Version information
*/
public static function VERSION() {
return 'PHPExcel ##VERSION##, ##DATE##';
@ -494,12 +494,12 @@ class PHPExcel_Calculation_Functions {
/**
* N
* N
*
* Returns a value converted to a number
* Returns a value converted to a number
*
* @param value The value you want converted
* @return number N converts values listed in the following table
* @param value The value you want converted
* @return number N converts values listed in the following table
* If value is or refers to N returns
* A number That number
* A date The serial number of that date
@ -534,12 +534,12 @@ class PHPExcel_Calculation_Functions {
/**
* TYPE
* TYPE
*
* Returns a number that identifies the type of a value
* Returns a number that identifies the type of a value
*
* @param value The value you want tested
* @return number N converts values listed in the following table
* @param value The value you want tested
* @return number N converts values listed in the following table
* If value is or refers to N returns
* A number 1
* Text 2
@ -584,10 +584,10 @@ class PHPExcel_Calculation_Functions {
/**
* Convert a multi-dimensional array to a simple 1-dimensional array
* Convert a multi-dimensional array to a simple 1-dimensional array
*
* @param array $array Array to be flattened
* @return array Flattened array
* @param array $array Array to be flattened
* @return array Flattened array
*/
public static function flattenArray($array) {
if (!is_array($array)) {
@ -616,10 +616,10 @@ class PHPExcel_Calculation_Functions {
/**
* Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing
* Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing
*
* @param array $array Array to be flattened
* @return array Flattened array
* @param array $array Array to be flattened
* @return array Flattened array
*/
public static function flattenArrayIndexed($array) {
if (!is_array($array)) {
@ -648,10 +648,10 @@ class PHPExcel_Calculation_Functions {
/**
* Convert an array to a single scalar value by extracting the first element
* Convert an array to a single scalar value by extracting the first element
*
* @param mixed $value Array or scalar value
* @return mixed
* @param mixed $value Array or scalar value
* @return mixed
*/
public static function flattenSingleValue($value = '') {
while (is_array($value)) {

View File

@ -46,16 +46,16 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_Calculation_Logical {
/**
* TRUE
* TRUE
*
* Returns the boolean TRUE.
* Returns the boolean TRUE.
*
* Excel Function:
* Excel Function:
* =TRUE()
*
* @access public
* @category Logical Functions
* @return boolean True
* @access public
* @category Logical Functions
* @return boolean True
*/
public static function TRUE() {
return TRUE;
@ -63,16 +63,16 @@ class PHPExcel_Calculation_Logical {
/**
* FALSE
* FALSE
*
* Returns the boolean FALSE.
* Returns the boolean FALSE.
*
* Excel Function:
* Excel Function:
* =FALSE()
*
* @access public
* @category Logical Functions
* @return boolean False
* @access public
* @category Logical Functions
* @return boolean False
*/
public static function FALSE() {
return FALSE;
@ -80,11 +80,11 @@ class PHPExcel_Calculation_Logical {
/**
* LOGICAL_AND
* LOGICAL_AND
*
* Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.
* Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.
*
* Excel Function:
* Excel Function:
* =AND(logical1[,logical2[, ...]])
*
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
@ -95,10 +95,10 @@ class PHPExcel_Calculation_Logical {
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
*
* @access public
* @category Logical Functions
* @param mixed $arg,... Data values
* @return boolean The logical AND of the arguments.
* @access public
* @category Logical Functions
* @param mixed $arg,... Data values
* @return boolean The logical AND of the arguments.
*/
public static function LOGICAL_AND() {
// Return value
@ -135,11 +135,11 @@ class PHPExcel_Calculation_Logical {
/**
* LOGICAL_OR
* LOGICAL_OR
*
* Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.
* Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.
*
* Excel Function:
* Excel Function:
* =OR(logical1[,logical2[, ...]])
*
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
@ -150,10 +150,10 @@ class PHPExcel_Calculation_Logical {
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
*
* @access public
* @category Logical Functions
* @param mixed $arg,... Data values
* @return boolean The logical OR of the arguments.
* @access public
* @category Logical Functions
* @param mixed $arg,... Data values
* @return boolean The logical OR of the arguments.
*/
public static function LOGICAL_OR() {
// Return value
@ -190,11 +190,11 @@ class PHPExcel_Calculation_Logical {
/**
* NOT
* NOT
*
* Returns the boolean inverse of the argument.
* Returns the boolean inverse of the argument.
*
* Excel Function:
* Excel Function:
* =NOT(logical)
*
* The argument must evaluate to a logical value such as TRUE or FALSE
@ -204,10 +204,10 @@ class PHPExcel_Calculation_Logical {
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
*
* @access public
* @category Logical Functions
* @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE
* @return boolean The boolean inverse of the argument.
* @access public
* @category Logical Functions
* @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE
* @return boolean The boolean inverse of the argument.
*/
public static function NOT($logical=FALSE) {
$logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical);
@ -226,11 +226,11 @@ class PHPExcel_Calculation_Logical {
} // function NOT()
/**
* STATEMENT_IF
* STATEMENT_IF
*
* Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
* Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
*
* Excel Function:
* Excel Function:
* =IF(condition[,returnIfTrue[,returnIfFalse]])
*
* Condition is any value or expression that can be evaluated to TRUE or FALSE.
@ -250,12 +250,12 @@ class PHPExcel_Calculation_Logical {
* If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.
* ReturnIfFalse can be another formula.
*
* @access public
* @category Logical Functions
* @param mixed $condition Condition to evaluate
* @param mixed $returnIfTrue Value to return when condition is true
* @param mixed $returnIfFalse Optional value to return when condition is false
* @return mixed The value of returnIfTrue or returnIfFalse determined by condition
* @access public
* @category Logical Functions
* @param mixed $condition Condition to evaluate
* @param mixed $returnIfTrue Value to return when condition is true
* @param mixed $returnIfFalse Optional value to return when condition is false
* @return mixed The value of returnIfTrue or returnIfFalse determined by condition
*/
public static function STATEMENT_IF($condition = TRUE, $returnIfTrue = 0, $returnIfFalse = FALSE) {
$condition = (is_null($condition)) ? TRUE : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition);
@ -267,16 +267,16 @@ class PHPExcel_Calculation_Logical {
/**
* IFERROR
* IFERROR
*
* Excel Function:
* Excel Function:
* =IFERROR(testValue,errorpart)
*
* @access public
* @category Logical Functions
* @param mixed $testValue Value to check, is also the value returned when no error
* @param mixed $errorpart Value to return when testValue is an error condition
* @return mixed The value of errorpart or testValue determined by error condition
* @access public
* @category Logical Functions
* @param mixed $testValue Value to check, is also the value returned when no error
* @param mixed $errorpart Value to return when testValue is an error condition
* @return mixed The value of errorpart or testValue determined by error condition
*/
public static function IFERROR($testValue = '', $errorpart = '') {
$testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);

View File

@ -47,25 +47,25 @@ class PHPExcel_Calculation_LookupRef {
/**
* CELL_ADDRESS
* CELL_ADDRESS
*
* Creates a cell address as text, given specified row and column numbers.
* Creates a cell address as text, given specified row and column numbers.
*
* Excel Function:
* Excel Function:
* =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])
*
* @param row Row number to use in the cell reference
* @param column Column number to use in the cell reference
* @param relativity Flag indicating the type of reference to return
* @param row Row number to use in the cell reference
* @param column Column number to use in the cell reference
* @param relativity Flag indicating the type of reference to return
* 1 or omitted Absolute
* 2 Absolute row; relative column
* 3 Relative row; absolute column
* 4 Relative
* @param referenceStyle A logical value that specifies the A1 or R1C1 reference style.
* @param referenceStyle A logical value that specifies the A1 or R1C1 reference style.
* TRUE or omitted CELL_ADDRESS returns an A1-style reference
* FALSE CELL_ADDRESS returns an R1C1-style reference
* @param sheetText Optional Name of worksheet to use
* @return string
* @param sheetText Optional Name of worksheet to use
* @return string
*/
public static function CELL_ADDRESS($row, $column, $relativity=1, $referenceStyle=True, $sheetText='') {
$row = PHPExcel_Calculation_Functions::flattenSingleValue($row);
@ -96,18 +96,18 @@ class PHPExcel_Calculation_LookupRef {
/**
* COLUMN
* COLUMN
*
* Returns the column number of the given cell reference
* If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array.
* If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
* Returns the column number of the given cell reference
* If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array.
* If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
* reference of the cell in which the COLUMN function appears; otherwise this function returns 0.
*
* Excel Function:
* Excel Function:
* =COLUMN([cellAddress])
*
* @param cellAddress A reference to a range of cells for which you want the column numbers
* @return integer or array of integer
* @param cellAddress A reference to a range of cells for which you want the column numbers
* @return integer or array of integer
*/
public static function COLUMN($cellAddress=Null) {
if (is_null($cellAddress) || trim($cellAddress) === '') { return 0; }
@ -139,15 +139,15 @@ class PHPExcel_Calculation_LookupRef {
/**
* COLUMNS
* COLUMNS
*
* Returns the number of columns in an array or reference.
* Returns the number of columns in an array or reference.
*
* Excel Function:
* Excel Function:
* =COLUMNS(cellAddress)
*
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns
* @return integer The number of columns in cellAddress
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns
* @return integer The number of columns in cellAddress
*/
public static function COLUMNS($cellAddress=Null) {
if (is_null($cellAddress) || $cellAddress === '') {
@ -170,18 +170,18 @@ class PHPExcel_Calculation_LookupRef {
/**
* ROW
* ROW
*
* Returns the row number of the given cell reference
* If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array.
* If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
* Returns the row number of the given cell reference
* If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array.
* If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
* reference of the cell in which the ROW function appears; otherwise this function returns 0.
*
* Excel Function:
* Excel Function:
* =ROW([cellAddress])
*
* @param cellAddress A reference to a range of cells for which you want the row numbers
* @return integer or array of integer
* @param cellAddress A reference to a range of cells for which you want the row numbers
* @return integer or array of integer
*/
public static function ROW($cellAddress=Null) {
if (is_null($cellAddress) || trim($cellAddress) === '') { return 0; }
@ -214,15 +214,15 @@ class PHPExcel_Calculation_LookupRef {
/**
* ROWS
* ROWS
*
* Returns the number of rows in an array or reference.
* Returns the number of rows in an array or reference.
*
* Excel Function:
* Excel Function:
* =ROWS(cellAddress)
*
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
* @return integer The number of rows in cellAddress
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
* @return integer The number of rows in cellAddress
*/
public static function ROWS($cellAddress=Null) {
if (is_null($cellAddress) || $cellAddress === '') {
@ -244,16 +244,16 @@ class PHPExcel_Calculation_LookupRef {
/**
* HYPERLINK
* HYPERLINK
*
* Excel Function:
* Excel Function:
* =HYPERLINK(linkURL,displayName)
*
* @access public
* @category Logical Functions
* @param string $linkURL Value to check, is also the value returned when no error
* @param string $displayName Value to return when testValue is an error condition
* @return mixed The value of $displayName (or $linkURL if $displayName was blank)
* @access public
* @category Logical Functions
* @param string $linkURL Value to check, is also the value returned when no error
* @param string $displayName Value to return when testValue is an error condition
* @return mixed The value of $displayName (or $linkURL if $displayName was blank)
*/
public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Cell $pCell = null) {
$args = func_get_args();
@ -277,20 +277,20 @@ class PHPExcel_Calculation_LookupRef {
/**
* INDIRECT
* INDIRECT
*
* Returns the reference specified by a text string.
* References are immediately evaluated to display their contents.
* Returns the reference specified by a text string.
* References are immediately evaluated to display their contents.
*
* Excel Function:
* Excel Function:
* =INDIRECT(cellAddress)
*
* NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010
* NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010
*
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
* @return mixed The cells referenced by cellAddress
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
* @return mixed The cells referenced by cellAddress
*
* @todo Support for the optional a1 parameter introduced in Excel 2010
* @todo Support for the optional a1 parameter introduced in Excel 2010
*
*/
public static function INDIRECT($cellAddress=Null, PHPExcel_Cell $pCell = null) {
@ -334,29 +334,29 @@ class PHPExcel_Calculation_LookupRef {
/**
* OFFSET
* OFFSET
*
* Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells.
* The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and
* the number of columns to be returned.
* Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells.
* The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and
* the number of columns to be returned.
*
* Excel Function:
* Excel Function:
* =OFFSET(cellAddress, rows, cols, [height], [width])
*
* @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or
* @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or
* range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
* @param rows The number of rows, up or down, that you want the upper-left cell to refer to.
* @param rows The number of rows, up or down, that you want the upper-left cell to refer to.
* Using 5 as the rows argument specifies that the upper-left cell in the reference is
* five rows below reference. Rows can be positive (which means below the starting reference)
* or negative (which means above the starting reference).
* @param cols The number of columns, to the left or right, that you want the upper-left cell of the result
* @param cols The number of columns, to the left or right, that you want the upper-left cell of the result
* to refer to. Using 5 as the cols argument specifies that the upper-left cell in the
* reference is five columns to the right of reference. Cols can be positive (which means
* to the right of the starting reference) or negative (which means to the left of the
* starting reference).
* @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
* @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
* @return string A reference to a cell or range of cells
* @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
* @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
* @return string A reference to a cell or range of cells
*/
public static function OFFSET($cellAddress=Null,$rows=0,$columns=0,$height=null,$width=null) {
$rows = PHPExcel_Calculation_Functions::flattenSingleValue($rows);
@ -427,22 +427,22 @@ class PHPExcel_Calculation_LookupRef {
/**
* CHOOSE
* CHOOSE
*
* Uses lookup_value to return a value from the list of value arguments.
* Use CHOOSE to select one of up to 254 values based on the lookup_value.
* Uses lookup_value to return a value from the list of value arguments.
* Use CHOOSE to select one of up to 254 values based on the lookup_value.
*
* Excel Function:
* Excel Function:
* =CHOOSE(index_num, value1, [value2], ...)
*
* @param index_num Specifies which value argument is selected.
* @param index_num Specifies which value argument is selected.
* Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number
* between 1 and 254.
* @param value1... Value1 is required, subsequent values are optional.
* @param value1... Value1 is required, subsequent values are optional.
* Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on
* index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or
* text.
* @return mixed The selected value
* @return mixed The selected value
*/
public static function CHOOSE() {
$chooseArgs = func_get_args();
@ -471,17 +471,17 @@ class PHPExcel_Calculation_LookupRef {
/**
* MATCH
* MATCH
*
* The MATCH function searches for a specified item in a range of cells
* The MATCH function searches for a specified item in a range of cells
*
* Excel Function:
* Excel Function:
* =MATCH(lookup_value, lookup_array, [match_type])
*
* @param lookup_value The value that you want to match in lookup_array
* @param lookup_array The range of cells being searched
* @param match_type The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered.
* @return integer The relative position of the found item
* @param lookup_value The value that you want to match in lookup_array
* @param lookup_array The range of cells being searched
* @param match_type The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered.
* @return integer The relative position of the found item
*/
public static function MATCH($lookup_value, $lookup_array, $match_type=1) {
$lookup_array = PHPExcel_Calculation_Functions::flattenArray($lookup_array);
@ -584,17 +584,17 @@ class PHPExcel_Calculation_LookupRef {
/**
* INDEX
* INDEX
*
* Uses an index to choose a value from a reference or array
* Uses an index to choose a value from a reference or array
*
* Excel Function:
* Excel Function:
* =INDEX(range_array, row_num, [column_num])
*
* @param range_array A range of cells or an array constant
* @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required.
* @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required.
* @return mixed the value of a specified cell or array of cells
* @param range_array A range of cells or an array constant
* @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required.
* @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required.
* @return mixed the value of a specified cell or array of cells
*/
public static function INDEX($arrayValues,$rowNum = 0,$columnNum = 0) {

View File

@ -76,26 +76,26 @@ class PHPExcel_Calculation_MathTrig {
/**
* ATAN2
* ATAN2
*
* This function calculates the arc tangent of the two variables x and y. It is similar to
* This function calculates the arc tangent of the two variables x and y. It is similar to
* calculating the arc tangent of y ÷ x, except that the signs of both arguments are used
* to determine the quadrant of the result.
* The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a
* The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a
* point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between
* -pi and pi, excluding -pi.
*
* Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard
* Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard
* PHP atan2() function, so we need to reverse them here before calling the PHP atan() function.
*
* Excel Function:
* Excel Function:
* ATAN2(xCoordinate,yCoordinate)
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param float $xCoordinate The x-coordinate of the point.
* @param float $yCoordinate The y-coordinate of the point.
* @return float The inverse tangent of the specified x- and y-coordinates.
* @access public
* @category Mathematical and Trigonometric Functions
* @param float $xCoordinate The x-coordinate of the point.
* @param float $yCoordinate The y-coordinate of the point.
* @return float The inverse tangent of the specified x- and y-coordinates.
*/
public static function ATAN2($xCoordinate, $yCoordinate) {
$xCoordinate = (float) PHPExcel_Calculation_Functions::flattenSingleValue($xCoordinate);
@ -110,13 +110,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* CEILING
* CEILING
*
* Returns number rounded up, away from zero, to the nearest multiple of significance.
* Returns number rounded up, away from zero, to the nearest multiple of significance.
*
* @param float $number Number to round
* @param float $significance Significance
* @return float Rounded Number
* @param float $number Number to round
* @param float $significance Significance
* @return float Rounded Number
*/
public static function CEILING($number,$significance=null) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -141,14 +141,14 @@ class PHPExcel_Calculation_MathTrig {
/**
* COMBIN
* COMBIN
*
* Returns the number of combinations for a given number of items. Use COMBIN to
* determine the total possible number of groups for a given number of items.
* Returns the number of combinations for a given number of items. Use COMBIN to
* determine the total possible number of groups for a given number of items.
*
* @param int $numObjs Number of different objects
* @param int $numInSet Number of objects in each combination
* @return int Number of combinations
* @param int $numObjs Number of different objects
* @param int $numInSet Number of objects in each combination
* @return int Number of combinations
*/
public static function COMBIN($numObjs,$numInSet) {
$numObjs = PHPExcel_Calculation_Functions::flattenSingleValue($numObjs);
@ -167,12 +167,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* EVEN
* EVEN
*
* Returns number rounded up to the nearest even integer.
* Returns number rounded up to the nearest even integer.
*
* @param float $number Number to round
* @return int Rounded Number
* @param float $number Number to round
* @return int Rounded Number
*/
public static function EVEN($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -192,12 +192,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* FACT
* FACT
*
* Returns the factorial of a number.
* Returns the factorial of a number.
*
* @param float $factVal Factorial Value
* @return int Factorial
* @param float $factVal Factorial Value
* @return int Factorial
*/
public static function FACT($factVal) {
$factVal = PHPExcel_Calculation_Functions::flattenSingleValue($factVal);
@ -224,12 +224,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* FACTDOUBLE
* FACTDOUBLE
*
* Returns the double factorial of a number.
* Returns the double factorial of a number.
*
* @param float $factVal Factorial Value
* @return int Double Factorial
* @param float $factVal Factorial Value
* @return int Double Factorial
*/
public static function FACTDOUBLE($factVal) {
$factLoop = PHPExcel_Calculation_Functions::flattenSingleValue($factVal);
@ -251,13 +251,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* FLOOR
* FLOOR
*
* Rounds number down, toward zero, to the nearest multiple of significance.
* Rounds number down, toward zero, to the nearest multiple of significance.
*
* @param float $number Number to round
* @param float $significance Significance
* @return float Rounded Number
* @param float $number Number to round
* @param float $significance Significance
* @return float Rounded Number
*/
public static function FLOOR($number,$significance=null) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -282,12 +282,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* GCD
* GCD
*
* Returns the greatest common divisor of a series of numbers
* Returns the greatest common divisor of a series of numbers
*
* @param $array Values to calculate the Greatest Common Divisor
* @return int Greatest Common Divisor
* @param $array Values to calculate the Greatest Common Divisor
* @return int Greatest Common Divisor
*/
public static function GCD() {
$returnValue = 1;
@ -347,12 +347,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* INT
* INT
*
* Casts a floating point value to an integer
* Casts a floating point value to an integer
*
* @param float $number Number to cast to an integer
* @return integer Integer value
* @param float $number Number to cast to an integer
* @return integer Integer value
*/
public static function INT($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -370,12 +370,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* LCM
* LCM
*
* Returns the lowest common multiplier of a series of numbers
* Returns the lowest common multiplier of a series of numbers
*
* @param $array Values to calculate the Lowest Common Multiplier
* @return int Lowest Common Multiplier
* @param $array Values to calculate the Lowest Common Multiplier
* @return int Lowest Common Multiplier
*/
public static function LCM() {
$returnValue = 1;
@ -414,18 +414,18 @@ class PHPExcel_Calculation_MathTrig {
/**
* LOG_BASE
* LOG_BASE
*
* Returns the logarithm of a number to a specified base. The default base is 10.
* Returns the logarithm of a number to a specified base. The default base is 10.
*
* Excel Function:
* Excel Function:
* LOG(number[,base])
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param float $value The positive real number for which you want the logarithm
* @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10.
* @return float
* @access public
* @category Mathematical and Trigonometric Functions
* @param float $value The positive real number for which you want the logarithm
* @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10.
* @return float
*/
public static function LOG_BASE($number = NULL, $base=10) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -582,13 +582,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* MROUND
* MROUND
*
* Rounds a number to the nearest multiple of a specified value
* Rounds a number to the nearest multiple of a specified value
*
* @param float $number Number to round
* @param int $multiple Multiple to which you want to round $number
* @return float Rounded Number
* @param float $number Number to round
* @param int $multiple Multiple to which you want to round $number
* @return float Rounded Number
*/
public static function MROUND($number,$multiple) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -609,12 +609,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* MULTINOMIAL
* MULTINOMIAL
*
* Returns the ratio of the factorial of a sum of values to the product of factorials.
* Returns the ratio of the factorial of a sum of values to the product of factorials.
*
* @param array of mixed Data Series
* @return float
* @param array of mixed Data Series
* @return float
*/
public static function MULTINOMIAL() {
$summer = 0;
@ -643,12 +643,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* ODD
* ODD
*
* Returns number rounded up to the nearest odd integer.
* Returns number rounded up to the nearest odd integer.
*
* @param float $number Number to round
* @return int Rounded Number
* @param float $number Number to round
* @return int Rounded Number
*/
public static function ODD($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -677,13 +677,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* POWER
* POWER
*
* Computes x raised to the power y.
* Computes x raised to the power y.
*
* @param float $x
* @param float $y
* @return float
* @param float $x
* @param float $y
* @return float
*/
public static function POWER($x = 0, $y = 2) {
$x = PHPExcel_Calculation_Functions::flattenSingleValue($x);
@ -703,17 +703,17 @@ class PHPExcel_Calculation_MathTrig {
/**
* PRODUCT
* PRODUCT
*
* PRODUCT returns the product of all the values and cells referenced in the argument list.
* PRODUCT returns the product of all the values and cells referenced in the argument list.
*
* Excel Function:
* Excel Function:
* PRODUCT(value1[,value2[, ...]])
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
*/
public static function PRODUCT() {
// Return value
@ -740,18 +740,18 @@ class PHPExcel_Calculation_MathTrig {
/**
* QUOTIENT
* QUOTIENT
*
* QUOTIENT function returns the integer portion of a division. Numerator is the divided number
* QUOTIENT function returns the integer portion of a division. Numerator is the divided number
* and denominator is the divisor.
*
* Excel Function:
* Excel Function:
* QUOTIENT(value1[,value2[, ...]])
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
*/
public static function QUOTIENT() {
// Return value
@ -827,13 +827,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* ROUNDUP
* ROUNDUP
*
* Rounds a number up to a specified number of decimal places
* Rounds a number up to a specified number of decimal places
*
* @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number
* @return float Rounded Number
* @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number
* @return float Rounded Number
*/
public static function ROUNDUP($number,$digits) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -852,13 +852,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* ROUNDDOWN
* ROUNDDOWN
*
* Rounds a number down to a specified number of decimal places
* Rounds a number down to a specified number of decimal places
*
* @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number
* @return float Rounded Number
* @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number
* @return float Rounded Number
*/
public static function ROUNDDOWN($number,$digits) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -877,15 +877,15 @@ class PHPExcel_Calculation_MathTrig {
/**
* SERIESSUM
* SERIESSUM
*
* Returns the sum of a power series
* Returns the sum of a power series
*
* @param float $x Input value to the power series
* @param float $n Initial power to which you want to raise $x
* @param float $m Step by which to increase $n for each term in the series
* @param array of mixed Data Series
* @return float
* @param float $x Input value to the power series
* @param float $n Initial power to which you want to raise $x
* @param float $m Step by which to increase $n for each term in the series
* @param array of mixed Data Series
* @return float
*/
public static function SERIESSUM() {
// Return value
@ -917,13 +917,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* SIGN
* SIGN
*
* Determines the sign of a number. Returns 1 if the number is positive, zero (0)
* if the number is 0, and -1 if the number is negative.
* Determines the sign of a number. Returns 1 if the number is positive, zero (0)
* if the number is 0, and -1 if the number is negative.
*
* @param float $number Number to round
* @return int sign value
* @param float $number Number to round
* @return int sign value
*/
public static function SIGN($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -941,12 +941,12 @@ class PHPExcel_Calculation_MathTrig {
/**
* SQRTPI
* SQRTPI
*
* Returns the square root of (number * pi).
* Returns the square root of (number * pi).
*
* @param float $number Number
* @return float Square Root of Number * Pi
* @param float $number Number
* @return float Square Root of Number * Pi
*/
public static function SQRTPI($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
@ -962,14 +962,14 @@ class PHPExcel_Calculation_MathTrig {
/**
* SUBTOTAL
* SUBTOTAL
*
* Returns a subtotal in a list or database.
* Returns a subtotal in a list or database.
*
* @param int the number 1 to 11 that specifies which function to
* @param int the number 1 to 11 that specifies which function to
* use in calculating subtotals within a list.
* @param array of mixed Data Series
* @return float
* @param array of mixed Data Series
* @return float
*/
public static function SUBTOTAL() {
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
@ -1019,17 +1019,17 @@ class PHPExcel_Calculation_MathTrig {
/**
* SUM
* SUM
*
* SUM computes the sum of all the values and cells referenced in the argument list.
* SUM computes the sum of all the values and cells referenced in the argument list.
*
* Excel Function:
* Excel Function:
* SUM(value1[,value2[, ...]])
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
*/
public static function SUM() {
// Return value
@ -1049,18 +1049,18 @@ class PHPExcel_Calculation_MathTrig {
/**
* SUMIF
* SUMIF
*
* Counts the number of cells that contain numbers within the list of arguments
* Counts the number of cells that contain numbers within the list of arguments
*
* Excel Function:
* Excel Function:
* SUMIF(value1[,value2[, ...]],condition)
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @param string $condition The criteria that defines which cells will be summed.
* @return float
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @param string $condition The criteria that defines which cells will be summed.
* @return float
*/
public static function SUMIF($aArgs,$condition,$sumArgs = array()) {
// Return value
@ -1119,17 +1119,17 @@ class PHPExcel_Calculation_MathTrig {
/**
* SUMSQ
* SUMSQ
*
* SUMSQ returns the sum of the squares of the arguments
* SUMSQ returns the sum of the squares of the arguments
*
* Excel Function:
* Excel Function:
* SUMSQ(value1[,value2[, ...]])
*
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
* @access public
* @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values
* @return float
*/
public static function SUMSQ() {
// Return value
@ -1236,13 +1236,13 @@ class PHPExcel_Calculation_MathTrig {
/**
* TRUNC
* TRUNC
*
* Truncates value to the number of fractional digits by number_digits.
* Truncates value to the number of fractional digits by number_digits.
*
* @param float $value
* @param int $digits
* @return float Truncated value
* @param float $value
* @param int $digits
* @return float Truncated value
*/
public static function TRUNC($value = 0, $digits = 0) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);

File diff suppressed because it is too large Load Diff

View File

@ -87,10 +87,10 @@ class PHPExcel_Calculation_TextData {
/**
* TRIMNONPRINTABLE
* TRIMNONPRINTABLE
*
* @param mixed $value Value to check
* @return string
* @param mixed $value Value to check
* @return string
*/
public static function TRIMNONPRINTABLE($stringValue = '') {
$stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
@ -111,10 +111,10 @@ class PHPExcel_Calculation_TextData {
/**
* TRIMSPACES
* TRIMSPACES
*
* @param mixed $value Value to check
* @return string
* @param mixed $value Value to check
* @return string
*/
public static function TRIMSPACES($stringValue = '') {
$stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
@ -187,16 +187,16 @@ class PHPExcel_Calculation_TextData {
/**
* DOLLAR
* DOLLAR
*
* This function converts a number to text using currency format, with the decimals rounded to the specified place.
* The format used is $#,##0.00_);($#,##0.00)..
* This function converts a number to text using currency format, with the decimals rounded to the specified place.
* The format used is $#,##0.00_);($#,##0.00)..
*
* @param float $value The value to format
* @param int $decimals The number of digits to display to the right of the decimal point.
* @param float $value The value to format
* @param int $decimals The number of digits to display to the right of the decimal point.
* If decimals is negative, number is rounded to the left of the decimal point.
* If you omit decimals, it is assumed to be 2
* @return string
* @return string
*/
public static function DOLLAR($value = 0, $decimals = 2) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -288,10 +288,10 @@ class PHPExcel_Calculation_TextData {
/**
* FIXEDFORMAT
* FIXEDFORMAT
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = FALSE) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -342,12 +342,12 @@ class PHPExcel_Calculation_TextData {
/**
* MID
* MID
*
* @param string $value Value
* @param int $start Start character
* @param int $chars Number of characters
* @return string
* @param string $value Value
* @param int $start Start character
* @param int $chars Number of characters
* @return string
*/
public static function MID($value = '', $start = 1, $chars = null) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -371,11 +371,11 @@ class PHPExcel_Calculation_TextData {
/**
* RIGHT
* RIGHT
*
* @param string $value Value
* @param int $chars Number of characters
* @return string
* @param string $value Value
* @param int $chars Number of characters
* @return string
*/
public static function RIGHT($value = '', $chars = 1) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -420,12 +420,12 @@ class PHPExcel_Calculation_TextData {
/**
* LOWERCASE
* LOWERCASE
*
* Converts a string value to upper case.
* Converts a string value to upper case.
*
* @param string $mixedCaseString
* @return string
* @param string $mixedCaseString
* @return string
*/
public static function LOWERCASE($mixedCaseString) {
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
@ -443,12 +443,12 @@ class PHPExcel_Calculation_TextData {
/**
* UPPERCASE
* UPPERCASE
*
* Converts a string value to upper case.
* Converts a string value to upper case.
*
* @param string $mixedCaseString
* @return string
* @param string $mixedCaseString
* @return string
*/
public static function UPPERCASE($mixedCaseString) {
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
@ -466,12 +466,12 @@ class PHPExcel_Calculation_TextData {
/**
* PROPERCASE
* PROPERCASE
*
* Converts a string value to upper case.
* Converts a string value to upper case.
*
* @param string $mixedCaseString
* @return string
* @param string $mixedCaseString
* @return string
*/
public static function PROPERCASE($mixedCaseString) {
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
@ -489,12 +489,12 @@ class PHPExcel_Calculation_TextData {
/**
* REPLACE
* REPLACE
*
* @param string $value Value
* @param int $start Start character
* @param int $chars Number of characters
* @return string
* @param string $value Value
* @param int $start Start character
* @param int $chars Number of characters
* @return string
*/
public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) {
$oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText);
@ -510,13 +510,13 @@ class PHPExcel_Calculation_TextData {
/**
* SUBSTITUTE
* SUBSTITUTE
*
* @param string $text Value
* @param string $fromText From Value
* @param string $toText To Value
* @param integer $instance Instance Number
* @return string
* @param string $text Value
* @param string $fromText From Value
* @param string $toText To Value
* @param integer $instance Instance Number
* @return string
*/
public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) {
$text = PHPExcel_Calculation_Functions::flattenSingleValue($text);
@ -557,10 +557,10 @@ class PHPExcel_Calculation_TextData {
/**
* RETURNSTRING
* RETURNSTRING
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function RETURNSTRING($testValue = '') {
$testValue = PHPExcel_Calculation_Functions::flattenSingleValue($testValue);
@ -573,10 +573,10 @@ class PHPExcel_Calculation_TextData {
/**
* TEXTFORMAT
* TEXTFORMAT
*
* @param mixed $value Value to check
* @return boolean
* @param mixed $value Value to check
* @return boolean
*/
public static function TEXTFORMAT($value,$format) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);

View File

@ -37,49 +37,49 @@ class PHPExcel_Chart_DataSeriesValues
{
/**
* Series Data Type
* Series Data Type
*
* @var string
* @var string
*/
private $_dataType = null;
/**
* Series Data Source
* Series Data Source
*
* @var string
* @var string
*/
private $_dataSource = null;
/**
* Format Code
* Format Code
*
* @var string
* @var string
*/
private $_formatCode = null;
/**
* Series Point Marker
* Series Point Marker
*
* @var string
* @var string
*/
private $_marker = null;
/**
* Point Count (The number of datapoints in the dataseries)
* Point Count (The number of datapoints in the dataseries)
*
* @var integer
* @var integer
*/
private $_pointCount = 0;
/**
* Data Values
* Data Values
*
* @var array of mixed
* @var array of mixed
*/
private $_dataValues = array();
/**
* Create a new PHPExcel_Chart_DataSeriesValues object
* Create a new PHPExcel_Chart_DataSeriesValues object
*/
public function __construct($dataType = null, $dataSource = null, $formatCode = null, $pointCount = 0, $dataValues = array(), $marker = null)
{
@ -92,19 +92,19 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Get Series Data Type
* Get Series Data Type
*
* @return string
* @return string
*/
public function getDataType() {
return $this->_dataType;
}
/**
* Set Series Data Type
* Set Series Data Type
*
* @param string $dataType
* @return PHPExcel_Chart_DataSeriesValues
* @param string $dataType
* @return PHPExcel_Chart_DataSeriesValues
*/
public function setDataType($dataType = 'Number') {
$this->_dataType = $dataType;
@ -113,19 +113,19 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Get Series Data Source (formula)
* Get Series Data Source (formula)
*
* @return string
* @return string
*/
public function getDataSource() {
return $this->_dataSource;
}
/**
* Set Series Data Source (formula)
* Set Series Data Source (formula)
*
* @param string $dataSource
* @return PHPExcel_Chart_DataSeriesValues
* @param string $dataSource
* @return PHPExcel_Chart_DataSeriesValues
*/
public function setDataSource($dataSource = null, $refreshDataValues = true) {
$this->_dataSource = $dataSource;
@ -138,19 +138,19 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Get Point Marker
* Get Point Marker
*
* @return string
* @return string
*/
public function getPointMarker() {
return $this->_marker;
}
/**
* Set Point Marker
* Set Point Marker
*
* @param string $marker
* @return PHPExcel_Chart_DataSeriesValues
* @param string $marker
* @return PHPExcel_Chart_DataSeriesValues
*/
public function setPointMarker($marker = null) {
$this->_marker = $marker;
@ -159,19 +159,19 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Get Series Format Code
* Get Series Format Code
*
* @return string
* @return string
*/
public function getFormatCode() {
return $this->_formatCode;
}
/**
* Set Series Format Code
* Set Series Format Code
*
* @param string $formatCode
* @return PHPExcel_Chart_DataSeriesValues
* @param string $formatCode
* @return PHPExcel_Chart_DataSeriesValues
*/
public function setFormatCode($formatCode = null) {
$this->_formatCode = $formatCode;
@ -180,18 +180,18 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Get Series Point Count
* Get Series Point Count
*
* @return integer
* @return integer
*/
public function getPointCount() {
return $this->_pointCount;
}
/**
* Identify if the Data Series is a multi-level or a simple series
* Identify if the Data Series is a multi-level or a simple series
*
* @return boolean
* @return boolean
*/
public function isMultiLevelSeries() {
if (count($this->_dataValues) > 0) {
@ -201,9 +201,9 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Identify if the Data Series is a multi-level or a simple series
* Return the level count of a multi-level Data Series
*
* @return boolean
* @return boolean
*/
public function multiLevelCount() {
$levelCount = 0;
@ -214,18 +214,18 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Get Series Data Values
* Get Series Data Values
*
* @return array of mixed
* @return array of mixed
*/
public function getDataValues() {
return $this->_dataValues;
}
/**
* Get the first Series Data value
* Get the first Series Data value
*
* @return mixed
* @return mixed
*/
public function getDataValue() {
$count = count($this->_dataValues);
@ -238,13 +238,13 @@ class PHPExcel_Chart_DataSeriesValues
}
/**
* Set Series Data Values
* Set Series Data Values
*
* @param array $dataValues
* @param boolean $refreshDataSource
* @param array $dataValues
* @param boolean $refreshDataSource
* TRUE - refresh the value of _dataSource based on the values of $dataValues
* FALSE - don't change the value of _dataSource
* @return PHPExcel_Chart_DataSeriesValues
* @return PHPExcel_Chart_DataSeriesValues
*/
public function setDataValues($dataValues = array(), $refreshDataSource = true) {
$this->_dataValues = PHPExcel_Calculation_Functions::flattenArray($dataValues);

View File

@ -58,23 +58,23 @@ class PHPExcel_Chart_Legend
);
/**
* Legend position
* Legend position
*
* @var string
* @var string
*/
private $_position = self::POSITION_RIGHT;
/**
* Allow overlay of other elements?
* Allow overlay of other elements?
*
* @var boolean
* @var boolean
*/
private $_overlay = true;
/**
* Legend Layout
* Legend Layout
*
* @var PHPExcel_Chart_Layout
* @var PHPExcel_Chart_Layout
*/
private $_layout = null;
@ -90,18 +90,18 @@ class PHPExcel_Chart_Legend
}
/**
* Get legend position as an excel string value
* Get legend position as an excel string value
*
* @return string
* @return string
*/
public function getPosition() {
return $this->_position;
}
/**
* Get legend position using an excel string value
* Get legend position using an excel string value
*
* @param string $position
* @param string $position
*/
public function setPosition($position = self::POSITION_RIGHT) {
if (!in_array($position,self::$positionXref)) {
@ -114,18 +114,18 @@ class PHPExcel_Chart_Legend
}
/**
* Get legend position as an Excel internal numeric value
* Get legend position as an Excel internal numeric value
*
* @return number
* @return number
*/
public function getPositionXL() {
return array_search($this->_position,self::$positionXref);
}
/**
* Set legend position using an Excel internal numeric value
* Set legend position using an Excel internal numeric value
*
* @param number $positionXL
* @param number $positionXL
*/
public function setPositionXL($positionXL = self::xlLegendPositionRight) {
if (!array_key_exists($positionXL,self::$positionXref)) {
@ -137,27 +137,27 @@ class PHPExcel_Chart_Legend
}
/**
* Get allow overlay of other elements?
* Get allow overlay of other elements?
*
* @return boolean
* @return boolean
*/
public function getOverlay() {
return $this->_overlay;
}
/**
* Set allow overlay of other elements?
* Set allow overlay of other elements?
*
* @param boolean $value
* @param boolean $value
*/
public function setOverlay($value=false) {
$this->_overlay = $value;
}
/**
* Get Layout
* Get Layout
*
* @return PHPExcel_Chart_Layout
* @return PHPExcel_Chart_Layout
*/
public function getLayout() {
return $this->_layout;

View File

@ -1,28 +1,28 @@
<?php
/**
* PHPExcel
* PHPExcel
*
* Copyright (c) 2006 - 2012 PHPExcel
* Copyright (c) 2006 - 2012 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 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.
* 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
* 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
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/

View File

@ -29,7 +29,7 @@
/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
/**
* @ignore
* @ignore
*/
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
@ -45,11 +45,11 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_IOFactory
{
/**
* Search locations
* Search locations
*
* @var array
* @access private
* @static
* @var array
* @access private
* @static
*/
private static $_searchLocations = array(
array( 'type' => 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ),
@ -57,11 +57,11 @@ class PHPExcel_IOFactory
);
/**
* Autoresolve classes
* Autoresolve classes
*
* @var array
* @access private
* @static
* @var array
* @access private
* @static
*/
private static $_autoResolveClasses = array(
'Excel2007',
@ -79,23 +79,23 @@ class PHPExcel_IOFactory
private function __construct() { }
/**
* Get search locations
* Get search locations
*
* @static
* @access public
* @return array
* @static
* @access public
* @return array
*/
public static function getSearchLocations() {
return self::$_searchLocations;
} // function getSearchLocations()
/**
* Set search locations
* Set search locations
*
* @static
* @access public
* @param array $value
* @throws Exception
* @static
* @access public
* @param array $value
* @throws Exception
*/
public static function setSearchLocations($value) {
if (is_array($value)) {
@ -106,27 +106,27 @@ class PHPExcel_IOFactory
} // function setSearchLocations()
/**
* Add search location
* Add search location
*
* @static
* @access public
* @param string $type Example: IWriter
* @param string $location Example: PHPExcel/Writer/{0}.php
* @param string $classname Example: PHPExcel_Writer_{0}
* @static
* @access public
* @param string $type Example: IWriter
* @param string $location Example: PHPExcel/Writer/{0}.php
* @param string $classname Example: PHPExcel_Writer_{0}
*/
public static function addSearchLocation($type = '', $location = '', $classname = '') {
self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname );
} // function addSearchLocation()
/**
* Create PHPExcel_Writer_IWriter
* Create PHPExcel_Writer_IWriter
*
* @static
* @access public
* @param PHPExcel $phpExcel
* @param string $writerType Example: Excel2007
* @return PHPExcel_Writer_IWriter
* @throws Exception
* @static
* @access public
* @param PHPExcel $phpExcel
* @param string $writerType Example: Excel2007
* @return PHPExcel_Writer_IWriter
* @throws Exception
*/
public static function createWriter(PHPExcel $phpExcel, $writerType = '') {
// Search type
@ -150,13 +150,13 @@ class PHPExcel_IOFactory
} // function createWriter()
/**
* Create PHPExcel_Reader_IReader
* Create PHPExcel_Reader_IReader
*
* @static
* @access public
* @param string $readerType Example: Excel2007
* @return PHPExcel_Reader_IReader
* @throws Exception
* @static
* @access public
* @param string $readerType Example: Excel2007
* @return PHPExcel_Reader_IReader
* @throws Exception
*/
public static function createReader($readerType = '') {
// Search type
@ -180,13 +180,13 @@ class PHPExcel_IOFactory
} // function createReader()
/**
* Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution
* Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution
*
* @static
* @access public
* @param string $pFileName
* @return PHPExcel
* @throws Exception
* @static
* @access public
* @param string $pFileName
* @return PHPExcel
* @throws Exception
*/
public static function load($pFilename) {
$reader = self::createReaderForFile($pFilename);
@ -194,13 +194,13 @@ class PHPExcel_IOFactory
} // function load()
/**
* Identify file type using automatic PHPExcel_Reader_IReader resolution
* Identify file type using automatic PHPExcel_Reader_IReader resolution
*
* @static
* @access public
* @param string $pFileName
* @return string
* @throws Exception
* @static
* @access public
* @param string $pFileName
* @return string
* @throws Exception
*/
public static function identify($pFilename) {
$reader = self::createReaderForFile($pFilename);
@ -211,13 +211,13 @@ class PHPExcel_IOFactory
} // function identify()
/**
* Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution
* Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution
*
* @static
* @access public
* @param string $pFileName
* @return PHPExcel_Reader_IReader
* @throws Exception
* @static
* @access public
* @param string $pFileName
* @return PHPExcel_Reader_IReader
* @throws Exception
*/
public static function createReaderForFile($pFilename) {

View File

@ -45,84 +45,84 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
{
/**
* Input encoding
* Input encoding
*
* @access private
* @var string
* @access private
* @var string
*/
private $_inputEncoding = 'UTF-8';
/**
* Delimiter
* Delimiter
*
* @access private
* @var string
* @access private
* @var string
*/
private $_delimiter = ',';
/**
* Enclosure
* Enclosure
*
* @access private
* @var string
* @access private
* @var string
*/
private $_enclosure = '"';
/**
* Line ending
* Line ending
*
* @access private
* @var string
* @access private
* @var string
*/
private $_lineEnding = PHP_EOL;
/**
* Sheet index to read
* Sheet index to read
*
* @access private
* @var int
* @access private
* @var int
*/
private $_sheetIndex = 0;
/**
* Load rows contiguously
* Load rows contiguously
*
* @access private
* @var int
* @access private
* @var int
*/
private $_contiguous = false;
/**
* Row counter for loading rows contiguously
* Row counter for loading rows contiguously
*
* @access private
* @var int
* @access private
* @var int
*/
private $_contiguousRow = -1;
/**
* PHPExcel_Reader_IReadFilter instance
* PHPExcel_Reader_IReadFilter instance
*
* @access private
* @var PHPExcel_Reader_IReadFilter
* @access private
* @var PHPExcel_Reader_IReadFilter
*/
private $_readFilter = null;
/**
* Create a new PHPExcel_Reader_CSV
* Create a new PHPExcel_Reader_CSV
*/
public function __construct() {
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
} // function __construct()
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @access public
* @param string $pFileName
* @return boolean
* @throws Exception
* @access public
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{
@ -135,12 +135,12 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function canRead()
/**
* Loads PHPExcel from file
* Loads PHPExcel from file
*
* @access public
* @param string $pFilename
* @return PHPExcel
* @throws Exception
* @access public
* @param string $pFilename
* @return PHPExcel
* @throws Exception
*/
public function load($pFilename)
{
@ -152,20 +152,20 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function load()
/**
* Read filter
* Read filter
*
* @access public
* @return PHPExcel_Reader_IReadFilter
* @access public
* @return PHPExcel_Reader_IReadFilter
*/
public function getReadFilter() {
return $this->_readFilter;
} // function getReadFilter()
/**
* Set read filter
* Set read filter
*
* @access public
* @param PHPExcel_Reader_IReadFilter $pValue
* @access public
* @param PHPExcel_Reader_IReadFilter $pValue
*/
public function setReadFilter(PHPExcel_Reader_IReadFilter $pValue) {
$this->_readFilter = $pValue;
@ -173,10 +173,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setReadFilter()
/**
* Set input encoding
* Set input encoding
*
* @access public
* @param string $pValue Input encoding
* @access public
* @param string $pValue Input encoding
*/
public function setInputEncoding($pValue = 'UTF-8')
{
@ -185,10 +185,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setInputEncoding()
/**
* Get input encoding
* Get input encoding
*
* @access public
* @return string
* @access public
* @return string
*/
public function getInputEncoding()
{
@ -196,13 +196,13 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function getInputEncoding()
/**
* Loads PHPExcel from file into PHPExcel instance
* Loads PHPExcel from file into PHPExcel instance
*
* @access public
* @param string $pFilename
* @param PHPExcel $objPHPExcel
* @return PHPExcel
* @throws Exception
* @access public
* @param string $pFilename
* @param PHPExcel $objPHPExcel
* @return PHPExcel
* @throws Exception
*/
public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
{
@ -297,21 +297,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function loadIntoExisting()
/**
* Get delimiter
* Get delimiter
*
* @access public
* @return string
* @access public
* @return string
*/
public function getDelimiter() {
return $this->_delimiter;
} // function getDelimiter()
/**
* Set delimiter
* Set delimiter
*
* @access public
* @param string $pValue Delimiter, defaults to ,
* @return PHPExcel_Reader_CSV
* @access public
* @param string $pValue Delimiter, defaults to ,
* @return PHPExcel_Reader_CSV
*/
public function setDelimiter($pValue = ',') {
$this->_delimiter = $pValue;
@ -319,21 +319,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setDelimiter()
/**
* Get enclosure
* Get enclosure
*
* @access public
* @return string
* @access public
* @return string
*/
public function getEnclosure() {
return $this->_enclosure;
} // function getEnclosure()
/**
* Set enclosure
* Set enclosure
*
* @access public
* @param string $pValue Enclosure, defaults to "
* @return PHPExcel_Reader_CSV
* @access public
* @param string $pValue Enclosure, defaults to "
* @return PHPExcel_Reader_CSV
*/
public function setEnclosure($pValue = '"') {
if ($pValue == '') {
@ -344,21 +344,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setEnclosure()
/**
* Get line ending
* Get line ending
*
* @access public
* @return string
* @access public
* @return string
*/
public function getLineEnding() {
return $this->_lineEnding;
} // function getLineEnding()
/**
* Set line ending
* Set line ending
*
* @access public
* @param string $pValue Line ending, defaults to OS line ending (PHP_EOL)
* @return PHPExcel_Reader_CSV
* @access public
* @param string $pValue Line ending, defaults to OS line ending (PHP_EOL)
* @return PHPExcel_Reader_CSV
*/
public function setLineEnding($pValue = PHP_EOL) {
$this->_lineEnding = $pValue;
@ -366,21 +366,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setLineEnding()
/**
* Get sheet index
* Get sheet index
*
* @access public
* @return int
* @access public
* @return int
*/
public function getSheetIndex() {
return $this->_sheetIndex;
} // function getSheetIndex()
/**
* Set sheet index
* Set sheet index
*
* @access public
* @param int $pValue Sheet index
* @return PHPExcel_Reader_CSV
* @access public
* @param int $pValue Sheet index
* @return PHPExcel_Reader_CSV
*/
public function setSheetIndex($pValue = 0) {
$this->_sheetIndex = $pValue;
@ -388,10 +388,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setSheetIndex()
/**
* Set Contiguous
* Set Contiguous
*
* @access public
* @param string $pValue Input encoding
* @access public
* @param string $pValue Input encoding
*/
public function setContiguous($contiguous = false)
{
@ -404,10 +404,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setInputEncoding()
/**
* Get Contiguous
* Get Contiguous
*
* @access public
* @return boolean
* @access public
* @return boolean
*/
public function getContiguous() {
return $this->_contiguous;

View File

@ -162,11 +162,11 @@ class PHPExcel_Reader_Excel2003XML implements PHPExcel_Reader_IReader
}
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @param string $pFileName
* @return boolean
* @throws Exception
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{

View File

@ -36,36 +36,36 @@ if (!defined('PHPEXCEL_ROOT')) {
}
/**
* PHPExcel_Reader_Excel2007
* PHPExcel_Reader_Excel2007
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
{
/**
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* or whether it should read both data and formatting
*
* @var boolean
* @var boolean
*/
private $_readDataOnly = false;
/**
* Read charts that are defined in the workbook?
* Identifies whether the Reader should read the definitions for any charts that exist in the workbook;
* Read charts that are defined in the workbook?
* Identifies whether the Reader should read the definitions for any charts that exist in the workbook;
*
* @var boolean
* @var boolean
*/
private $_includeCharts = false;
/**
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
*
* @var array of string
* @var array of string
*/
private $_loadSheetsOnly = null;
@ -92,24 +92,24 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
/**
* Read data only?
* Read data only?
* If this is true, then the Reader will only read data values for cells, it will not read any formatting information.
* If false (the default) it will read data and formatting.
*
* @return boolean
* @return boolean
*/
public function getReadDataOnly() {
return $this->_readDataOnly;
}
/**
* Set read data only
* Set read data only
* Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information.
* Set to false (the default) to advise the Reader to read both data and formatting for cells.
*
* @param boolean $pValue
* @param boolean $pValue
*
* @return PHPExcel_Reader_Excel2007
* @return PHPExcel_Reader_Excel2007
*/
public function setReadDataOnly($pValue = false) {
$this->_readDataOnly = $pValue;
@ -117,26 +117,26 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
}
/**
* Read charts in workbook?
* Read charts in workbook?
* If this is true, then the Reader will include any charts that exist in the workbook.
* Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value.
* If false (the default) it will ignore any charts defined in the workbook file.
*
* @return boolean
* @return boolean
*/
public function getIncludeCharts() {
return $this->_includeCharts;
}
/**
* Set read charts in workbook
* Set read charts in workbook
* Set to true, to advise the Reader to include any charts that exist in the workbook.
* Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value.
* Set to false (the default) to discard charts.
*
* @param boolean $pValue
* @param boolean $pValue
*
* @return PHPExcel_Reader_Excel2007
* @return PHPExcel_Reader_Excel2007
*/
public function setIncludeCharts($pValue = false) {
$this->_includeCharts = (boolean) $pValue;
@ -144,11 +144,11 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
}
/**
* Get which sheets to load
* Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null
* indicating that all worksheets in the workbook should be loaded.
* Get which sheets to load
* Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null
* indicating that all worksheets in the workbook should be loaded.
*
* @return mixed
* @return mixed
*/
public function getLoadSheetsOnly()
{
@ -156,13 +156,13 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
}
/**
* Set which sheets to load
* Set which sheets to load
*
* @param mixed $value
* @param mixed $value
* This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name.
* If NULL, then it tells the Reader to read all worksheets in the workbook
*
* @return PHPExcel_Reader_Excel2007
* @return PHPExcel_Reader_Excel2007
*/
public function setLoadSheetsOnly($value = null)
{
@ -172,10 +172,10 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
}
/**
* Set all sheets to load
* Set all sheets to load
* Tells the Reader to load all worksheets from the workbook.
*
* @return PHPExcel_Reader_Excel2007
* @return PHPExcel_Reader_Excel2007
*/
public function setLoadAllSheets()
{
@ -212,11 +212,11 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
}
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @param string $pFileName
* @return boolean
* @throws Exception
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{

View File

@ -67,13 +67,13 @@ if (!defined('PHPEXCEL_ROOT')) {
}
/**
* PHPExcel_Reader_Excel5
* PHPExcel_Reader_Excel5
*
* This class uses {@link http://sourceforge.net/projects/phpexcelreader/parseXL}
* This class uses {@link http://sourceforge.net/projects/phpexcelreader/parseXL}
*
* @category PHPExcel
* @package PHPExcel_Reader_Excel5
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @category PHPExcel
* @package PHPExcel_Reader_Excel5
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
{
@ -159,19 +159,19 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
const XLS_Type_UNKNOWN = 0xffff;
/**
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* or whether it should read both data and formatting
*
* @var boolean
* @var boolean
*/
private $_readDataOnly = false;
/**
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
*
* @var array of string
* @var array of string
*/
private $_loadSheetsOnly = null;
@ -403,11 +403,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
/**
* Read data only?
* Read data only?
* If this is true, then the Reader will only read data values for cells, it will not read any formatting information.
* If false (the default) it will read data and formatting.
*
* @return boolean
* @return boolean
*/
public function getReadDataOnly()
{
@ -415,13 +415,13 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
}
/**
* Set read data only
* Set read data only
* Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information.
* Set to false (the default) to advise the Reader to read both data and formatting for cells.
*
* @param boolean $pValue
* @param boolean $pValue
*
* @return PHPExcel_Reader_Excel5
* @return PHPExcel_Reader_Excel5
*/
public function setReadDataOnly($pValue = false)
{
@ -430,11 +430,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
}
/**
* Get which sheets to load
* Get which sheets to load
* Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null
* indicating that all worksheets in the workbook should be loaded.
*
* @return mixed
* @return mixed
*/
public function getLoadSheetsOnly()
{
@ -442,13 +442,13 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
}
/**
* Set which sheets to load
* Set which sheets to load
*
* @param mixed $value
* @param mixed $value
* This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name.
* If NULL, then it tells the Reader to read all worksheets in the workbook
*
* @return PHPExcel_Reader_Excel5
* @return PHPExcel_Reader_Excel5
*/
public function setLoadSheetsOnly($value = null)
{
@ -458,10 +458,10 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
}
/**
* Set all sheets to load
* Set all sheets to load
* Tells the Reader to load all worksheets from the workbook.
*
* @return PHPExcel_Reader_Excel5
* @return PHPExcel_Reader_Excel5
*/
public function setLoadAllSheets()
{
@ -497,11 +497,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
}
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @param string $pFileName
* @return boolean
* @throws Exception
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{

View File

@ -36,28 +36,28 @@ if (!defined('PHPEXCEL_ROOT')) {
}
/**
* PHPExcel_Reader_Gnumeric
* PHPExcel_Reader_Gnumeric
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
{
/**
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* or whether it should read both data and formatting
*
* @var boolean
* @var boolean
*/
private $_readDataOnly = false;
/**
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
*
* @var array of string
* @var array of string
*/
private $_loadSheetsOnly = null;
@ -86,24 +86,24 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
/**
* Read data only?
* Read data only?
* If this is true, then the Reader will only read data values for cells, it will not read any formatting information.
* If false (the default) it will read data and formatting.
*
* @return boolean
* @return boolean
*/
public function getReadDataOnly() {
return $this->_readDataOnly;
}
/**
* Set read data only
* Set read data only
* Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information.
* Set to false (the default) to advise the Reader to read both data and formatting for cells.
*
* @param boolean $pValue
* @param boolean $pValue
*
* @return PHPExcel_Reader_Gnumeric
* @return PHPExcel_Reader_Gnumeric
*/
public function setReadDataOnly($pValue = false) {
$this->_readDataOnly = $pValue;
@ -111,11 +111,11 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
}
/**
* Get which sheets to load
* Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null
* indicating that all worksheets in the workbook should be loaded.
* Get which sheets to load
* Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null
* indicating that all worksheets in the workbook should be loaded.
*
* @return mixed
* @return mixed
*/
public function getLoadSheetsOnly()
{
@ -123,13 +123,13 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
}
/**
* Set which sheets to load
* Set which sheets to load
*
* @param mixed $value
* @param mixed $value
* This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name.
* If NULL, then it tells the Reader to read all worksheets in the workbook
*
* @return PHPExcel_Reader_Gnumeric
* @return PHPExcel_Reader_Gnumeric
*/
public function setLoadSheetsOnly($value = null)
{
@ -139,10 +139,10 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
}
/**
* Set all sheets to load
* Set all sheets to load
* Tells the Reader to load all worksheets from the workbook.
*
* @return PHPExcel_Reader_Gnumeric
* @return PHPExcel_Reader_Gnumeric
*/
public function setLoadAllSheets()
{
@ -179,11 +179,11 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
}
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @param string $pFileName
* @return boolean
* @throws Exception
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{

View File

@ -36,28 +36,28 @@ if (!defined('PHPEXCEL_ROOT')) {
}
/**
* PHPExcel_Reader_OOCalc
* PHPExcel_Reader_OOCalc
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
{
/**
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information;
* or whether it should read both data and formatting
*
* @var boolean
* @var boolean
*/
private $_readDataOnly = false;
/**
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
* Restrict which sheets should be loaded?
* This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.
*
* @var array of string
* @var array of string
*/
private $_loadSheetsOnly = null;
@ -77,24 +77,23 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
/**
* Read data only?
* Read data only?
* If this is true, then the Reader will only read data values for cells, it will not read any formatting information.
* If false (the default) it will read data and formatting.
*
* @return boolean
* @return boolean
*/
public function getReadDataOnly() {
return $this->_readDataOnly;
}
/**
* Set read data only
* Set read data only
* Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information.
* Set to false (the default) to advise the Reader to read both data and formatting for cells.
*
* @param boolean $pValue
*
* @return PHPExcel_Reader_OOCalc
* @param boolean $pValue
* @return PHPExcel_Reader_OOCalc
*/
public function setReadDataOnly($pValue = false) {
$this->_readDataOnly = $pValue;
@ -102,11 +101,11 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
}
/**
* Get which sheets to load
* Get which sheets to load
* Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null
* indicating that all worksheets in the workbook should be loaded.
*
* @return mixed
* @return mixed
*/
public function getLoadSheetsOnly()
{
@ -114,13 +113,13 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
}
/**
* Set which sheets to load
* Set which sheets to load
*
* @param mixed $value
* @param mixed $value
* This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name.
* If NULL, then it tells the Reader to read all worksheets in the workbook
*
* @return PHPExcel_Reader_OOCalc
* @return PHPExcel_Reader_OOCalc
*/
public function setLoadSheetsOnly($value = null)
{
@ -130,10 +129,10 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
}
/**
* Set all sheets to load
* Set all sheets to load
* Tells the Reader to load all worksheets from the workbook.
*
* @return PHPExcel_Reader_OOCalc
* @return PHPExcel_Reader_OOCalc
*/
public function setLoadAllSheets()
{
@ -169,11 +168,11 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
}
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @param string $pFileName
* @return boolean
* @throws Exception
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{

View File

@ -87,11 +87,11 @@ class PHPExcel_Reader_SYLK implements PHPExcel_Reader_IReader
}
/**
* Can the current PHPExcel_Reader_IReader read the file?
* Can the current PHPExcel_Reader_IReader read the file?
*
* @param string $pFileName
* @return boolean
* @throws Exception
* @param string $pFileName
* @return boolean
* @throws Exception
*/
public function canRead($pFilename)
{

View File

@ -63,55 +63,55 @@ class PHPExcel_Settings
/**
* Name of the class used for Zip file management
* Name of the class used for Zip file management
* e.g.
* ZipArchive
*
* @var string
* @var string
*/
private static $_zipClass = self::ZIPARCHIVE;
/**
* Name of the external Library used for rendering charts
* Name of the external Library used for rendering charts
* e.g.
* jpgraph
*
* @var string
* @var string
*/
private static $_chartRendererName = NULL;
/**
* Directory Path to the external Library used for rendering charts
* Directory Path to the external Library used for rendering charts
*
* @var string
* @var string
*/
private static $_chartRendererPath = NULL;
/**
* Name of the external Library used for rendering PDF files
* Name of the external Library used for rendering PDF files
* e.g.
* mPDF
*
* @var string
* @var string
*/
private static $_pdfRendererName = NULL;
/**
* Directory Path to the external Library used for rendering PDF files
* Directory Path to the external Library used for rendering PDF files
*
* @var string
* @var string
*/
private static $_pdfRendererPath = NULL;
/**
* Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive)
* Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive)
*
* @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
* @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
* @return boolean Success or failure
* @return boolean Success or failure
*/
public static function setZipClass($zipClass) {
if (($zipClass === self::PCLZIP) ||
@ -124,10 +124,10 @@ class PHPExcel_Settings
/**
* Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive)
* Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive)
* for Zip file management
*
* @return string Name of the Zip handler Class that PHPExcel is configured to use
* @return string Name of the Zip handler Class that PHPExcel is configured to use
* for Zip file management
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
*/
@ -137,9 +137,9 @@ class PHPExcel_Settings
/**
* Return the name of the method that is currently configured for cell cacheing
* Return the name of the method that is currently configured for cell cacheing
*
* @return string Name of the cacheing method
* @return string Name of the cacheing method
*/
public static function getCacheStorageMethod() {
return PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod;
@ -147,9 +147,9 @@ class PHPExcel_Settings
/**
* Return the name of the class that is currently being used for cell cacheing
* Return the name of the class that is currently being used for cell cacheing
*
* @return string Name of the class currently being used for cacheing
* @return string Name of the class currently being used for cacheing
*/
public static function getCacheStorageClass() {
return PHPExcel_CachedObjectStorageFactory::$_cacheStorageClass;
@ -157,11 +157,11 @@ class PHPExcel_Settings
/**
* Set the method that should be used for cell cacheing
* Set the method that should be used for cell cacheing
*
* @param string $method Name of the cacheing method
* @param array $arguments Optional configuration arguments for the cacheing method
* @return boolean Success or failure
* @param string $method Name of the cacheing method
* @param array $arguments Optional configuration arguments for the cacheing method
* @return boolean Success or failure
*/
public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory,
$arguments = array()) {
@ -170,10 +170,10 @@ class PHPExcel_Settings
/**
* Set the locale code to use for formula translations and any special formatting
* Set the locale code to use for formula translations and any special formatting
*
* @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk")
* @return boolean Success or failure
* @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk")
* @return boolean Success or failure
*/
public static function setLocale($locale='en_us') {
return PHPExcel_Calculation::getInstance()->setLocale($locale);

View File

@ -31,8 +31,8 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
{
/**
* Directory for temporary files
* @var string
* Directory for temporary files
* @var string
*/
protected $_tmp_dir = NULL;

View File

@ -683,10 +683,10 @@ class PHPExcel_Shared_String
}
/**
* Set the currency code. Only used by PHPExcel_Style_NumberFormat::toFormattedString()
* Set the currency code. Only used by PHPExcel_Style_NumberFormat::toFormattedString()
* to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF
*
* @param string $pValue Character for currency code
* @param string $pValue Character for currency code
*/
public static function setCurrencyCode($pValue = '$')
{

View File

@ -535,11 +535,24 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
return $pChart;
}
/**
* Return the count of charts on this worksheet
*
* @return int The number of charts
* @throws Exception
*/
public function getChartCount()
{
return count($this->_chartCollection);
}
/**
* Get a chart by its index position
*
* @param string $index Chart index position
* @return false|PHPExcel_Chart
* @throws Exception
*/
public function getChartByIndex($index = null)
{
$chartCount = count($this->_chartCollection);
@ -556,6 +569,12 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
return $this->_chartCollection[$index];
}
/**
* Return an array of the names of charts on this worksheet
*
* @return string[] The names of charts
* @throws Exception
*/
public function getChartNames()
{
$chartNames = array();
@ -565,6 +584,13 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
return $chartNames;
}
/**
* Get a chart by name
*
* @param string $chartName Chart name
* @return false|PHPExcel_Chart
* @throws Exception
*/
public function getChartByName($chartName = '')
{
$chartCount = count($this->_chartCollection);
@ -1250,7 +1276,6 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
* Get column dimension at a specific column by using numeric cell coordinates
*
* @param string $pColumn Numeric column coordinate of the cell
* @param string $pRow Numeric row coordinate of the cell
* @return PHPExcel_Worksheet_ColumnDimension
*/
public function getColumnDimensionByColumn($pColumn = 0)
@ -1284,7 +1309,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
* Set default style - should only be used by PHPExcel_IReader implementations!
*
* @deprecated
* @param PHPExcel_Style $value
* @param PHPExcel_Style $pValue
* @throws Exception
* @return PHPExcel_Worksheet
*/
@ -2221,7 +2246,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/**
* Selected cell
*
* @param string $pCell Cell (i.e. A1)
* @param string $pCoordinate Cell (i.e. A1)
* @return PHPExcel_Worksheet
*/
public function setSelectedCell($pCoordinate = 'A1')
@ -2588,7 +2613,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/**
* Hyperlink at a specific coordinate exists?
*
* @param string $pCellCoordinate
* @param string $pCoordinate
* @return boolean
*/
public function hyperlinkExists($pCoordinate = 'A1')
@ -2643,7 +2668,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/**
* Data validation at a specific coordinate exists?
*
* @param string $pCellCoordinate
* @param string $pCoordinate
* @return boolean
*/
public function dataValidationExists($pCoordinate = 'A1')

View File

@ -117,7 +117,7 @@ class PHPExcel_Worksheet_CellIterator implements Iterator
}
/**
* More PHPExcel_Cell instances available?
* Are there any more PHPExcel_Cell instances available?
*
* @return boolean
*/
@ -151,9 +151,9 @@ class PHPExcel_Worksheet_CellIterator implements Iterator
}
/**
* Set loop only existing cells
* Set the iterator to loop only existing cells
*
* @return boolean
* @param boolean $value
*/
public function setIterateOnlyExistingCells($value = true) {
$this->_onlyExistingCells = $value;

View File

@ -214,7 +214,7 @@ class PHPExcel_Worksheet_PageSetup
*
* @var boolean
*/
private $_fitToPage = false;
private $_fitToPage = FALSE;
/**
* Fit To Height
@ -251,28 +251,28 @@ class PHPExcel_Worksheet_PageSetup
*
* @var boolean
*/
private $_horizontalCentered = false;
private $_horizontalCentered = FALSE;
/**
* Center page vertically
*
* @var boolean
*/
private $_verticalCentered = false;
private $_verticalCentered = FALSE;
/**
* Print area
*
* @var string
*/
private $_printArea = null;
private $_printArea = NULL;
/**
* First page number
*
* @var int
*/
private $_firstPageNumber = null;
private $_firstPageNumber = NULL;
/**
* Create a new PHPExcel_Worksheet_PageSetup
@ -336,10 +336,10 @@ class PHPExcel_Worksheet_PageSetup
* Print scaling. Valid values range from 10 to 400
* This setting is overridden when fitToWidth and/or fitToHeight are in use
*
* @param int? $pValue
* @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth
* @throws Exception
* @param int? $pValue
* @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth
* @return PHPExcel_Worksheet_PageSetup
* @throws Exception
*/
public function setScale($pValue = 100, $pUpdate = true) {
// Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface,
@ -370,7 +370,7 @@ class PHPExcel_Worksheet_PageSetup
* @param boolean $pValue
* @return PHPExcel_Worksheet_PageSetup
*/
public function setFitToPage($pValue = true) {
public function setFitToPage($pValue = TRUE) {
$this->_fitToPage = $pValue;
return $this;
}
@ -391,10 +391,10 @@ class PHPExcel_Worksheet_PageSetup
* @param boolean $pUpdate Update fitToPage so it applies rather than scaling
* @return PHPExcel_Worksheet_PageSetup
*/
public function setFitToHeight($pValue = 1, $pUpdate = true) {
public function setFitToHeight($pValue = 1, $pUpdate = TRUE) {
$this->_fitToHeight = $pValue;
if ($pUpdate) {
$this->_fitToPage = true;
$this->_fitToPage = TRUE;
}
return $this;
}
@ -415,10 +415,10 @@ class PHPExcel_Worksheet_PageSetup
* @param boolean $pUpdate Update fitToPage so it applies rather than scaling
* @return PHPExcel_Worksheet_PageSetup
*/
public function setFitToWidth($pValue = 1, $pUpdate = true) {
public function setFitToWidth($pValue = 1, $pUpdate = TRUE) {
$this->_fitToWidth = $pValue;
if ($pUpdate) {
$this->_fitToPage = true;
$this->_fitToPage = TRUE;
}
return $this;
}
@ -499,7 +499,7 @@ class PHPExcel_Worksheet_PageSetup
/**
* Set Rows to repeat at top
*
* @param array $pValue Containing start column and end column, empty array if option unset
* @param array $pValue Containing start column and end column, empty array if option unset
* @return PHPExcel_Worksheet_PageSetup
*/
public function setRowsToRepeatAtTop($pValue = null) {
@ -564,12 +564,12 @@ class PHPExcel_Worksheet_PageSetup
/**
* Get print area
*
* @param int $index Identifier for a specific print area range if several ranges have been set
* @param int $index Identifier for a specific print area range if several ranges have been set
* Default behaviour, or a index value of 0, will return all ranges as a comma-separated string
* Otherwise, the specific range identified by the value of $index will be returned
* Print areas are numbered from 1
* @throws Exception
* @return string
* @throws Exception
* @return string
*/
public function getPrintArea($index = 0) {
if ($index == 0) {
@ -583,13 +583,13 @@ class PHPExcel_Worksheet_PageSetup
}
/**
* Is print area set?
* Is print area set?
*
* @param int $index Identifier for a specific print area range if several ranges have been set
* @param int $index Identifier for a specific print area range if several ranges have been set
* Default behaviour, or an index value of 0, will identify whether any print range is set
* Otherwise, existence of the range identified by the value of $index will be returned
* Print areas are numbered from 1
* @return boolean
* @return boolean
*/
public function isPrintAreaSet($index = 0) {
if ($index == 0) {
@ -600,13 +600,13 @@ class PHPExcel_Worksheet_PageSetup
}
/**
* Clear a print area
* Clear a print area
*
* @param int $index Identifier for a specific print area range if several ranges have been set
* @param int $index Identifier for a specific print area range if several ranges have been set
* Default behaviour, or an index value of 0, will clear all print ranges that are set
* Otherwise, the range identified by the value of $index will be removed from the series
* Print areas are numbered from 1
* @return PHPExcel_Worksheet_PageSetup
* @return PHPExcel_Worksheet_PageSetup
*/
public function clearPrintArea($index = 0) {
if ($index == 0) {
@ -623,10 +623,10 @@ class PHPExcel_Worksheet_PageSetup
}
/**
* Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20'
* Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20'
*
* @param string $value
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* @param string $value
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* When the method is "O"verwrite, then a positive integer index will overwrite that indexed
* entry in the print areas list; a negative index value will identify which entry to
* overwrite working bacward through the print area to the list, with the last entry as -1.
@ -636,11 +636,11 @@ class PHPExcel_Worksheet_PageSetup
* Specifying an index value of 0, will always append the new print range at the end of the
* list.
* Print areas are numbered from 1
* @param string $method Determines the method used when setting multiple print areas
* @param string $method Determines the method used when setting multiple print areas
* Default behaviour, or the "O" method, overwrites existing print area
* The "I" method, inserts the new print area before any specified index, or at the end of the list
* @throws Exception
* @return PHPExcel_Worksheet_PageSetup
* @return PHPExcel_Worksheet_PageSetup
* @throws Exception
*/
public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) {
if (strpos($value,'!') !== false) {
@ -688,44 +688,44 @@ class PHPExcel_Worksheet_PageSetup
}
/**
* Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas
* Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas
*
* @param string $value
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* @param string $value
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* A positive index will insert after that indexed entry in the print areas list, while a
* negative index will insert before the indexed entry.
* Specifying an index value of 0, will always append the new print range at the end of the
* list.
* Print areas are numbered from 1
* @throws Exception
* @return PHPExcel_Worksheet_PageSetup
* @return PHPExcel_Worksheet_PageSetup
* @throws Exception
*/
public function addPrintArea($value, $index = -1) {
return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT);
}
/**
* Set print area
* Set print area
*
* @param int $column1 Column 1
* @param int $row1 Row 1
* @param int $column2 Column 2
* @param int $row2 Row 2
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* When the method is "O"verwrite, then a positive integer index will overwrite that indexed
* entry in the print areas list; a negative index value will identify which entry to
* overwrite working bacward through the print area to the list, with the last entry as -1.
* Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.
* When the method is "I"nsert, then a positive index will insert after that indexed entry in
* the print areas list, while a negative index will insert before the indexed entry.
* Specifying an index value of 0, will always append the new print range at the end of the
* list.
* Print areas are numbered from 1
* @param string $method Determines the method used when setting multiple print areas
* Default behaviour, or the "O" method, overwrites existing print area
* The "I" method, inserts the new print area before any specified index, or at the end of the list
* @throws Exception
* @return PHPExcel_Worksheet_PageSetup
* @param int $column1 Column 1
* @param int $row1 Row 1
* @param int $column2 Column 2
* @param int $row2 Row 2
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* When the method is "O"verwrite, then a positive integer index will overwrite that indexed
* entry in the print areas list; a negative index value will identify which entry to
* overwrite working bacward through the print area to the list, with the last entry as -1.
* Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.
* When the method is "I"nsert, then a positive index will insert after that indexed entry in
* the print areas list, while a negative index will insert before the indexed entry.
* Specifying an index value of 0, will always append the new print range at the end of the
* list.
* Print areas are numbered from 1
* @param string $method Determines the method used when setting multiple print areas
* Default behaviour, or the "O" method, overwrites existing print area
* The "I" method, inserts the new print area before any specified index, or at the end of the list
* @return PHPExcel_Worksheet_PageSetup
* @throws Exception
*/
public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE)
{
@ -733,20 +733,20 @@ class PHPExcel_Worksheet_PageSetup
}
/**
* Add a new print area to the list of print areas
* Add a new print area to the list of print areas
*
* @param int $column1 Column 1
* @param int $row1 Row 1
* @param int $column2 Column 2
* @param int $row2 Row 2
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* @param int $column1 Start Column for the print area
* @param int $row1 Start Row for the print area
* @param int $column2 End Column for the print area
* @param int $row2 End Row for the print area
* @param int $index Identifier for a specific print area range allowing several ranges to be set
* A positive index will insert after that indexed entry in the print areas list, while a
* negative index will insert before the indexed entry.
* Specifying an index value of 0, will always append the new print range at the end of the
* list.
* Print areas are numbered from 1
* @throws Exception
* @return PHPExcel_Worksheet_PageSetup
* @return PHPExcel_Worksheet_PageSetup
* @throws Exception
*/
public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
{

View File

@ -36,10 +36,10 @@
class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
{
/**
* Write charts that are defined in the workbook?
* Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object;
* Write charts that are defined in the workbook?
* Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object;
*
* @var boolean
* @var boolean
*/
private $_includeCharts = false;
@ -480,24 +480,24 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
}
/**
* Write charts in workbook?
* Write charts in workbook?
* If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object.
* If false (the default) it will ignore any charts defined in the PHPExcel object.
*
* @return boolean
* @return boolean
*/
public function getIncludeCharts() {
return $this->_includeCharts;
}
/**
* Set write charts in workbook
* Set write charts in workbook
* Set to true, to advise the Writer to include any charts that exist in the PHPExcel object.
* Set to false (the default) to ignore charts.
*
* @param boolean $pValue
* @param boolean $pValue
*
* @return PHPExcel_Writer_Excel2007
* @return PHPExcel_Writer_Excel2007
*/
public function setIncludeCharts($pValue = false) {
$this->_includeCharts = (boolean) $pValue;

View File

@ -108,6 +108,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
return $objWriter->getData();
}
/**
* Write Chart Title
*
* @param PHPExcel_Chart_Title $title
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeTitle(PHPExcel_Chart_Title $title = null, $objWriter)
{
if (is_null($title)) {
@ -145,6 +152,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Chart Legend
*
* @param PHPExcel_Chart_Legend $legend
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter)
{
if (is_null($legend)) {
@ -189,6 +203,15 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Chart Plot Area
*
* @param PHPExcel_Chart_PlotArea $plotArea
* @param PHPExcel_Chart_Title $xAxisLabel
* @param PHPExcel_Chart_Title $yAxisLabel
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writePlotArea(PHPExcel_Chart_PlotArea $plotArea,
PHPExcel_Chart_Title $xAxisLabel = NULL,
PHPExcel_Chart_Title $yAxisLabel = NULL,
@ -318,6 +341,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Data Labels
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeDataLbls($objWriter)
{
$objWriter->startElement('c:dLbls');
@ -353,6 +382,18 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Category Axis
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Chart_PlotArea $plotArea
* @param PHPExcel_Chart_Title $xAxisLabel
* @param string $groupType Chart type
* @param string $id1
* @param string $id2
* @param boolean $isMultiLevelSeries
* @throws Exception
*/
private function _writeCatAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries)
{
$objWriter->startElement('c:catAx');
@ -464,6 +505,18 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
}
/**
* Write Value Axis
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Chart_PlotArea $plotArea
* @param PHPExcel_Chart_Title $yAxisLabel
* @param string $groupType Chart type
* @param string $id1
* @param string $id2
* @param boolean $isMultiLevelSeries
* @throws Exception
*/
private function _writeValAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries)
{
$objWriter->startElement('c:valAx');
@ -573,6 +626,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
}
/**
* Get the data series type(s) for a chart plot series
*
* @param PHPExcel_Chart_PlotArea $plotArea
* @return string|array
* @throws Exception
*/
private static function _getChartType($plotArea)
{
$groupCount = $plotArea->getPlotGroupCount();
@ -593,6 +653,17 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
return $chartType;
}
/**
* Write Plot Group (series of related plots)
*
* @param PHPExcel_Chart_DataSeries $plotGroup
* @param string $groupType Type of plot for dataseries
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param boolean &$catIsMultiLevelSeries Is category a multi-series category
* @param boolean &$valIsMultiLevelSeries Is value set a multi-series set
* @param string &$plotGroupingType Type of grouping for multi-series values
* @throws Exception
*/
private function _writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType)
{
if (is_null($plotGroup)) {
@ -770,6 +841,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
}
}
/**
* Write Plot Series Label
*
* @param PHPExcel_Chart_DataSeriesValues $plotSeriesLabel
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writePlotSeriesLabel($plotSeriesLabel, $objWriter)
{
if (is_null($plotSeriesLabel)) {
@ -798,6 +876,15 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
}
/**
* Write Plot Series Values
*
* @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string $groupType Type of plot for dataseries
* @param string $dataType Datatype of series values
* @throws Exception
*/
private function _writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType='str')
{
if (is_null($plotSeriesValues)) {
@ -878,6 +965,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
}
}
/**
* Write Bubble Chart Details
*
* @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeBubbles($plotSeriesValues, $objWriter)
{
if (is_null($plotSeriesValues)) {
@ -912,6 +1006,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Layout
*
* @param PHPExcel_Chart_Layout $layout
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeLayout(PHPExcel_Chart_Layout $layout = NULL, $objWriter)
{
$objWriter->startElement('c:layout');
@ -974,6 +1075,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Alternate Content block
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeAlternateContent($objWriter)
{
$objWriter->startElement('mc:AlternateContent');
@ -997,6 +1104,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement();
}
/**
* Write Printer Settings
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writePrintSettings($objWriter)
{
$objWriter->startElement('c:printSettings');

View File

@ -38,7 +38,8 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
/**
* Write content types to XML format
*
* @param PHPExcel $pPHPExcel
* @param PHPExcel $pPHPExcel
* @param boolean $includeCharts Flag indicating if we should include drawing details for charts
* @return string XML Output
* @throws Exception
*/

View File

@ -38,8 +38,10 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
/**
* Write drawings to XML format
*
* @param PHPExcel_Worksheet $pWorksheet
* @return string XML Output
* @param PHPExcel_Worksheet $pWorksheet
* @param int &$chartRef Chart ID
* @param boolean $includeCharts Flag indicating if we should include drawing details for charts
* @return string XML Output
* @throws Exception
*/
public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE)