Source for file PHPExcel.php
Documentation is available at PHPExcel.php
* Copyright (c) 2006 - 2009 PHPExcel
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* @copyright Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.6.5, 2009-01-05
require_once 'PHPExcel/Cell.php';
/** PHPExcel_DocumentProperties */
require_once 'PHPExcel/DocumentProperties.php';
/** PHPExcel_DocumentSecurity */
require_once 'PHPExcel/DocumentSecurity.php';
/** PHPExcel_Worksheet */
require_once 'PHPExcel/Worksheet.php';
/** PHPExcel_Shared_ZipStreamWrapper */
require_once 'PHPExcel/Shared/ZipStreamWrapper.php';
/** PHPExcel_NamedRange */
require_once 'PHPExcel/NamedRange.php';
* @copyright Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
* @var PHPExcel_DocumentProperties
* @var PHPExcel_DocumentSecurity
* Collection of Worksheet objects
* @var PHPExcel_Worksheet[]
* @var PHPExcel_NamedRange[]
* Create a new PHPExcel with one Worksheet
// Initialise worksheet collection and add one worksheet
// Create document properties
// Create document security
* @return PHPExcel_DocumentProperties
* @param PHPExcel_DocumentProperties $pValue
public function setProperties(PHPExcel_DocumentProperties $pValue)
* @return PHPExcel_DocumentSecurity
* @param PHPExcel_DocumentSecurity $pValue
public function setSecurity(PHPExcel_DocumentSecurity $pValue)
* @return PHPExcel_Worksheet
* Create sheet and add it to this workbook
* @return PHPExcel_Worksheet
* @param PHPExcel_Worksheet $pSheet
public function addSheet(PHPExcel_Worksheet $pSheet = null)
* @param int $pIndex Active sheet index
throw new Exception("Sheet index is out of bounds.");
* @param int $pIndex Sheet index
* @return PHPExcel_Worksheet
throw new Exception("Sheet index is out of bounds.");
* @return PHPExcel_Worksheet[]
* @param string $pName Sheet name
* @return PHPExcel_Worksheet
for ($i = 0; $i < $worksheetCount; ++ $i) {
* @param PHPExcel_Worksheet $pSheet
public function getIndex(PHPExcel_Worksheet $pSheet)
if ($value->getHashCode() == $pSheet->getHashCode()) {
* @return int Active sheet index
* @param int $pIndex Active sheet index
throw new Exception("Active sheet index is out of bounds.");
for ($i = 0; $i < $worksheetCount; ++ $i) {
* @param PHPExcel_Worksheet $pSheet External sheet to add
throw new Exception("Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename the external sheet first. ");
$pSheet->rebindParent($this);
* @return PHPExcel_NamedRange[]
* @param PHPExcel_NamedRange $namedRange
* @param string $namedRange
* @param string $namedRange
* Copy workbook (!= clone!)
for ($i = 0; $i < $worksheetCount; ++ $i) {
* Implement PHP __clone to create a deep clone, not just a shallow copy.
foreach ($vars as $key => $value) {
$this->$key = clone $value;
|