ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel.php
Go to the documentation of this file.
1<?php
30if (!defined('PHPEXCEL_ROOT')) {
31 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/');
32 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
33}
34
35
44{
50 private $_uniqueID;
51
57 private $_properties;
58
64 private $_security;
65
71 private $_workSheetCollection = array();
72
78 private $_calculationEngine = NULL;
79
85 private $_activeSheetIndex = 0;
86
92 private $_namedRanges = array();
93
100
106 private $_cellXfCollection = array();
107
113 private $_cellStyleXfCollection = array();
114
120 private $_hasMacros = FALSE;
121
127 private $_macrosCode=NULL;
134
140 private $_ribbonXMLData=NULL;
141
148 private $_ribbonBinObjects=NULL;
149
155 public function hasMacros(){
156 return $this->_hasMacros;
157 }
158
164 public function setHasMacros($hasMacros=false){
165 $this->_hasMacros=(bool)$hasMacros;
166 }
167
173 public function setMacrosCode($MacrosCode){
174 $this->_macrosCode=$MacrosCode;
175 $this->setHasMacros(!is_null($MacrosCode));
176 }
177
183 public function getMacrosCode(){
184 return $this->_macrosCode;
185 }
186
192 public function setMacrosCertificate($Certificate=NULL){
193 $this->_macrosCertificate=$Certificate;
194 }
195
201 public function hasMacrosCertificate(){
202 return !is_null($this->_macrosCertificate);
203 }
204
210 public function getMacrosCertificate(){
212 }
213
220 public function discardMacros(){
221 $this->_hasMacros=false;
222 $this->_macrosCode=NULL;
223 $this->_macrosCertificate=NULL;
224 }
225
230 public function setRibbonXMLData($Target=NULL, $XMLData=NULL){
231 if(!is_null($Target) && !is_null($XMLData)){
232 $this->_ribbonXMLData=array('target'=>$Target, 'data'=>$XMLData);
233 }else{
234 $this->_ribbonXMLData=NULL;
235 }
236 }
237
243 public function getRibbonXMLData($What='all'){//we need some constants here...
244 $ReturnData=NULL;
245 $What=strtolower($What);
246 switch($What){
247 case 'all':
248 $ReturnData=$this->_ribbonXMLData;
249 break;
250 case 'target':
251 case 'data':
252 if(is_array($this->_ribbonXMLData) && array_key_exists($What,$this->_ribbonXMLData)){
253 $ReturnData=$this->_ribbonXMLData[$What];
254 }//else $ReturnData stay at null
255 break;
256 }//default: $ReturnData at null
257 return $ReturnData;
258 }
259
264 public function setRibbonBinObjects($BinObjectsNames=NULL, $BinObjectsData=NULL){
265 if(!is_null($BinObjectsNames) && !is_null($BinObjectsData)){
266 $this->_ribbonBinObjects=array('names'=>$BinObjectsNames, 'data'=>$BinObjectsData);
267 }else{
268 $this->_ribbonBinObjects=NULL;
269 }
270 }
275 private function _getExtensionOnly($ThePath){
276 return pathinfo($ThePath, PATHINFO_EXTENSION);
277 }
278
283 public function getRibbonBinObjects($What='all'){
284 $ReturnData=NULL;
285 $What=strtolower($What);
286 switch($What){
287 case 'all':
289 break;
290 case 'names':
291 case 'data':
292 if(is_array($this->_ribbonBinObjects) && array_key_exists($What, $this->_ribbonBinObjects)){
293 $ReturnData=$this->_ribbonBinObjects[$What];
294 }
295 break;
296 case 'types':
297 if(is_array($this->_ribbonBinObjects) && array_key_exists('data', $this->_ribbonBinObjects) && is_array($this->_ribbonBinObjects['data'])){
298 $tmpTypes=array_keys($this->_ribbonBinObjects['data']);
299 $ReturnData=array_unique(array_map(array($this,'_getExtensionOnly'), $tmpTypes));
300 }else
301 $ReturnData=array();//the caller want an array... not null if empty
302 break;
303 }
304 return $ReturnData;
305 }
306
312 public function hasRibbon(){
313 return !is_null($this->_ribbonXMLData);
314 }
315
321 public function hasRibbonBinObjects(){
322 return !is_null($this->_ribbonBinObjects);
323 }
324
331 public function sheetCodeNameExists($pSheetCodeName)
332 {
333 return ($this->getSheetByCodeName($pSheetCodeName) !== NULL);
334 }
335
342 public function getSheetByCodeName($pName = '')
343 {
344 $worksheetCount = count($this->_workSheetCollection);
345 for ($i = 0; $i < $worksheetCount; ++$i) {
346 if ($this->_workSheetCollection[$i]->getCodeName() == $pName) {
347 return $this->_workSheetCollection[$i];
348 }
349 }
350
351 return null;
352 }
353
357 public function __construct()
358 {
359 $this->_uniqueID = uniqid();
360 $this->_calculationEngine = PHPExcel_Calculation::getInstance($this);
361
362 // Initialise worksheet collection and add one worksheet
363 $this->_workSheetCollection = array();
364 $this->_workSheetCollection[] = new PHPExcel_Worksheet($this);
365 $this->_activeSheetIndex = 0;
366
367 // Create document properties
368 $this->_properties = new PHPExcel_DocumentProperties();
369
370 // Create document security
371 $this->_security = new PHPExcel_DocumentSecurity();
372
373 // Set named ranges
374 $this->_namedRanges = array();
375
376 // Create the cellXf supervisor
377 $this->_cellXfSupervisor = new PHPExcel_Style(true);
378 $this->_cellXfSupervisor->bindParent($this);
379
380 // Create the default style
381 $this->addCellXf(new PHPExcel_Style);
382 $this->addCellStyleXf(new PHPExcel_Style);
383 }
384
389 public function __destruct() {
391 $this->disconnectWorksheets();
392 } // function __destruct()
393
399 public function disconnectWorksheets()
400 {
401 $worksheet = NULL;
402 foreach($this->_workSheetCollection as $k => &$worksheet) {
403 $worksheet->disconnectCells();
404 $this->_workSheetCollection[$k] = null;
405 }
406 unset($worksheet);
407 $this->_workSheetCollection = array();
408 }
409
415 public function getCalculationEngine()
416 {
418 } // function getCellCacheController()
419
425 public function getProperties()
426 {
427 return $this->_properties;
428 }
429
436 {
437 $this->_properties = $pValue;
438 }
439
445 public function getSecurity()
446 {
447 return $this->_security;
448 }
449
455 public function setSecurity(PHPExcel_DocumentSecurity $pValue)
456 {
457 $this->_security = $pValue;
458 }
459
467 public function getActiveSheet()
468 {
469 return $this->getSheet($this->_activeSheetIndex);
470 }
471
479 public function createSheet($iSheetIndex = NULL)
480 {
481 $newSheet = new PHPExcel_Worksheet($this);
482 $this->addSheet($newSheet, $iSheetIndex);
483 return $newSheet;
484 }
485
492 public function sheetNameExists($pSheetName)
493 {
494 return ($this->getSheetByName($pSheetName) !== NULL);
495 }
496
505 public function addSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = NULL)
506 {
507 if ($this->sheetNameExists($pSheet->getTitle())) {
508 throw new PHPExcel_Exception(
509 "Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first."
510 );
511 }
512
513 if($iSheetIndex === NULL) {
514 if ($this->_activeSheetIndex < 0) {
515 $this->_activeSheetIndex = 0;
516 }
517 $this->_workSheetCollection[] = $pSheet;
518 } else {
519 // Insert the sheet at the requested index
520 array_splice(
521 $this->_workSheetCollection,
522 $iSheetIndex,
523 0,
524 array($pSheet)
525 );
526
527 // Adjust active sheet index if necessary
528 if ($this->_activeSheetIndex >= $iSheetIndex) {
530 }
531 }
532
533 if ($pSheet->getParent() === null) {
534 $pSheet->rebindParent($this);
535 }
536
537 return $pSheet;
538 }
539
546 public function removeSheetByIndex($pIndex = 0)
547 {
548
549 $numSheets = count($this->_workSheetCollection);
550
551 if ($pIndex > $numSheets - 1) {
552 throw new PHPExcel_Exception(
553 "You tried to remove a sheet by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}."
554 );
555 } else {
556 array_splice($this->_workSheetCollection, $pIndex, 1);
557 }
558 // Adjust active sheet index if necessary
559 if (($this->_activeSheetIndex >= $pIndex) &&
560 ($pIndex > count($this->_workSheetCollection) - 1)) {
562 }
563
564 }
565
573 public function getSheet($pIndex = 0)
574 {
575 if (!isset($this->_workSheetCollection[$pIndex])) {
576 $numSheets = $this->getSheetCount();
577 throw new PHPExcel_Exception(
578 "Your requested sheet index: {$pIndex} is out of bounds. The actual number of sheets is {$numSheets}."
579 );
580 }
581
582 return $this->_workSheetCollection[$pIndex];
583 }
584
590 public function getAllSheets()
591 {
593 }
594
601 public function getSheetByName($pName = '')
602 {
603 $worksheetCount = count($this->_workSheetCollection);
604 for ($i = 0; $i < $worksheetCount; ++$i) {
605 if ($this->_workSheetCollection[$i]->getTitle() === $pName) {
606 return $this->_workSheetCollection[$i];
607 }
608 }
609
610 return NULL;
611 }
612
620 public function getIndex(PHPExcel_Worksheet $pSheet)
621 {
622 foreach ($this->_workSheetCollection as $key => $value) {
623 if ($value->getHashCode() == $pSheet->getHashCode()) {
624 return $key;
625 }
626 }
627
628 throw new PHPExcel_Exception("Sheet does not exist.");
629 }
630
639 public function setIndexByName($sheetName, $newIndex)
640 {
641 $oldIndex = $this->getIndex($this->getSheetByName($sheetName));
642 $pSheet = array_splice(
643 $this->_workSheetCollection,
644 $oldIndex,
645 1
646 );
647 array_splice(
648 $this->_workSheetCollection,
649 $newIndex,
650 0,
651 $pSheet
652 );
653 return $newIndex;
654 }
655
661 public function getSheetCount()
662 {
663 return count($this->_workSheetCollection);
664 }
665
671 public function getActiveSheetIndex()
672 {
674 }
675
683 public function setActiveSheetIndex($pIndex = 0)
684 {
685 $numSheets = count($this->_workSheetCollection);
686
687 if ($pIndex > $numSheets - 1) {
688 throw new PHPExcel_Exception(
689 "You tried to set a sheet active by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}."
690 );
691 } else {
692 $this->_activeSheetIndex = $pIndex;
693 }
694 return $this->getActiveSheet();
695 }
696
704 public function setActiveSheetIndexByName($pValue = '')
705 {
706 if (($worksheet = $this->getSheetByName($pValue)) instanceof PHPExcel_Worksheet) {
708 return $worksheet;
709 }
710
711 throw new PHPExcel_Exception('Workbook does not contain sheet:' . $pValue);
712 }
713
719 public function getSheetNames()
720 {
721 $returnValue = array();
722 $worksheetCount = $this->getSheetCount();
723 for ($i = 0; $i < $worksheetCount; ++$i) {
724 $returnValue[] = $this->getSheet($i)->getTitle();
725 }
726
727 return $returnValue;
728 }
729
738 public function addExternalSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = null) {
739 if ($this->sheetNameExists($pSheet->getTitle())) {
740 throw new PHPExcel_Exception("Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename the external sheet first.");
741 }
742
743 // count how many cellXfs there are in this workbook currently, we will need this below
744 $countCellXfs = count($this->_cellXfCollection);
745
746 // copy all the shared cellXfs from the external workbook and append them to the current
747 foreach ($pSheet->getParent()->getCellXfCollection() as $cellXf) {
748 $this->addCellXf(clone $cellXf);
749 }
750
751 // move sheet to this workbook
752 $pSheet->rebindParent($this);
753
754 // update the cellXfs
755 foreach ($pSheet->getCellCollection(false) as $cellID) {
756 $cell = $pSheet->getCell($cellID);
757 $cell->setXfIndex( $cell->getXfIndex() + $countCellXfs );
758 }
759
760 return $this->addSheet($pSheet, $iSheetIndex);
761 }
762
768 public function getNamedRanges() {
769 return $this->_namedRanges;
770 }
771
778 public function addNamedRange(PHPExcel_NamedRange $namedRange) {
779 if ($namedRange->getScope() == null) {
780 // global scope
781 $this->_namedRanges[$namedRange->getName()] = $namedRange;
782 } else {
783 // local scope
784 $this->_namedRanges[$namedRange->getScope()->getTitle().'!'.$namedRange->getName()] = $namedRange;
785 }
786 return true;
787 }
788
796 public function getNamedRange($namedRange, PHPExcel_Worksheet $pSheet = null) {
797 $returnValue = null;
798
799 if ($namedRange != '' && ($namedRange !== NULL)) {
800 // first look for global defined name
801 if (isset($this->_namedRanges[$namedRange])) {
802 $returnValue = $this->_namedRanges[$namedRange];
803 }
804
805 // then look for local defined name (has priority over global defined name if both names exist)
806 if (($pSheet !== NULL) && isset($this->_namedRanges[$pSheet->getTitle() . '!' . $namedRange])) {
807 $returnValue = $this->_namedRanges[$pSheet->getTitle() . '!' . $namedRange];
808 }
809 }
810
811 return $returnValue;
812 }
813
821 public function removeNamedRange($namedRange, PHPExcel_Worksheet $pSheet = null) {
822 if ($pSheet === NULL) {
823 if (isset($this->_namedRanges[$namedRange])) {
824 unset($this->_namedRanges[$namedRange]);
825 }
826 } else {
827 if (isset($this->_namedRanges[$pSheet->getTitle() . '!' . $namedRange])) {
828 unset($this->_namedRanges[$pSheet->getTitle() . '!' . $namedRange]);
829 }
830 }
831 return $this;
832 }
833
839 public function getWorksheetIterator() {
840 return new PHPExcel_WorksheetIterator($this);
841 }
842
848 public function copy() {
849 $copied = clone $this;
850
851 $worksheetCount = count($this->_workSheetCollection);
852 for ($i = 0; $i < $worksheetCount; ++$i) {
853 $this->_workSheetCollection[$i] = $this->_workSheetCollection[$i]->copy();
854 $this->_workSheetCollection[$i]->rebindParent($this);
855 }
856
857 return $copied;
858 }
859
863 public function __clone() {
864 foreach($this as $key => $val) {
865 if (is_object($val) || (is_array($val))) {
866 $this->{$key} = unserialize(serialize($val));
867 }
868 }
869 }
870
876 public function getCellXfCollection()
877 {
879 }
880
887 public function getCellXfByIndex($pIndex = 0)
888 {
889 return $this->_cellXfCollection[$pIndex];
890 }
891
898 public function getCellXfByHashCode($pValue = '')
899 {
900 foreach ($this->_cellXfCollection as $cellXf) {
901 if ($cellXf->getHashCode() == $pValue) {
902 return $cellXf;
903 }
904 }
905 return false;
906 }
907
914 public function cellXfExists($pCellStyle = null)
915 {
916 return in_array($pCellStyle, $this->_cellXfCollection, true);
917 }
918
925 public function getDefaultStyle()
926 {
927 if (isset($this->_cellXfCollection[0])) {
928 return $this->_cellXfCollection[0];
929 }
930 throw new PHPExcel_Exception('No default style found for this workbook');
931 }
932
939 {
940 $this->_cellXfCollection[] = $style;
941 $style->setIndex(count($this->_cellXfCollection) - 1);
942 }
943
950 public function removeCellXfByIndex($pIndex = 0)
951 {
952 if ($pIndex > count($this->_cellXfCollection) - 1) {
953 throw new PHPExcel_Exception("CellXf index is out of bounds.");
954 } else {
955 // first remove the cellXf
956 array_splice($this->_cellXfCollection, $pIndex, 1);
957
958 // then update cellXf indexes for cells
959 foreach ($this->_workSheetCollection as $worksheet) {
960 foreach ($worksheet->getCellCollection(false) as $cellID) {
961 $cell = $worksheet->getCell($cellID);
962 $xfIndex = $cell->getXfIndex();
963 if ($xfIndex > $pIndex ) {
964 // decrease xf index by 1
965 $cell->setXfIndex($xfIndex - 1);
966 } else if ($xfIndex == $pIndex) {
967 // set to default xf index 0
968 $cell->setXfIndex(0);
969 }
970 }
971 }
972 }
973 }
974
980 public function getCellXfSupervisor()
981 {
983 }
984
990 public function getCellStyleXfCollection()
991 {
993 }
994
1001 public function getCellStyleXfByIndex($pIndex = 0)
1002 {
1003 return $this->_cellStyleXfCollection[$pIndex];
1004 }
1005
1012 public function getCellStyleXfByHashCode($pValue = '')
1013 {
1014 foreach ($this->_cellStyleXfCollection as $cellStyleXf) {
1015 if ($cellStyleXf->getHashCode() == $pValue) {
1016 return $cellStyleXf;
1017 }
1018 }
1019 return false;
1020 }
1021
1027 public function addCellStyleXf(PHPExcel_Style $pStyle)
1028 {
1029 $this->_cellStyleXfCollection[] = $pStyle;
1030 $pStyle->setIndex(count($this->_cellStyleXfCollection) - 1);
1031 }
1032
1039 public function removeCellStyleXfByIndex($pIndex = 0)
1040 {
1041 if ($pIndex > count($this->_cellStyleXfCollection) - 1) {
1042 throw new PHPExcel_Exception("CellStyleXf index is out of bounds.");
1043 } else {
1044 array_splice($this->_cellStyleXfCollection, $pIndex, 1);
1045 }
1046 }
1047
1052 public function garbageCollect()
1053 {
1054 // how many references are there to each cellXf ?
1055 $countReferencesCellXf = array();
1056 foreach ($this->_cellXfCollection as $index => $cellXf) {
1057 $countReferencesCellXf[$index] = 0;
1058 }
1059
1060 foreach ($this->getWorksheetIterator() as $sheet) {
1061
1062 // from cells
1063 foreach ($sheet->getCellCollection(false) as $cellID) {
1064 $cell = $sheet->getCell($cellID);
1065 ++$countReferencesCellXf[$cell->getXfIndex()];
1066 }
1067
1068 // from row dimensions
1069 foreach ($sheet->getRowDimensions() as $rowDimension) {
1070 if ($rowDimension->getXfIndex() !== null) {
1071 ++$countReferencesCellXf[$rowDimension->getXfIndex()];
1072 }
1073 }
1074
1075 // from column dimensions
1076 foreach ($sheet->getColumnDimensions() as $columnDimension) {
1077 ++$countReferencesCellXf[$columnDimension->getXfIndex()];
1078 }
1079 }
1080
1081 // remove cellXfs without references and create mapping so we can update xfIndex
1082 // for all cells and columns
1083 $countNeededCellXfs = 0;
1084 foreach ($this->_cellXfCollection as $index => $cellXf) {
1085 if ($countReferencesCellXf[$index] > 0 || $index == 0) { // we must never remove the first cellXf
1086 ++$countNeededCellXfs;
1087 } else {
1088 unset($this->_cellXfCollection[$index]);
1089 }
1090 $map[$index] = $countNeededCellXfs - 1;
1091 }
1092 $this->_cellXfCollection = array_values($this->_cellXfCollection);
1093
1094 // update the index for all cellXfs
1095 foreach ($this->_cellXfCollection as $i => $cellXf) {
1096 $cellXf->setIndex($i);
1097 }
1098
1099 // make sure there is always at least one cellXf (there should be)
1100 if (empty($this->_cellXfCollection)) {
1101 $this->_cellXfCollection[] = new PHPExcel_Style();
1102 }
1103
1104 // update the xfIndex for all cells, row dimensions, column dimensions
1105 foreach ($this->getWorksheetIterator() as $sheet) {
1106
1107 // for all cells
1108 foreach ($sheet->getCellCollection(false) as $cellID) {
1109 $cell = $sheet->getCell($cellID);
1110 $cell->setXfIndex( $map[$cell->getXfIndex()] );
1111 }
1112
1113 // for all row dimensions
1114 foreach ($sheet->getRowDimensions() as $rowDimension) {
1115 if ($rowDimension->getXfIndex() !== null) {
1116 $rowDimension->setXfIndex( $map[$rowDimension->getXfIndex()] );
1117 }
1118 }
1119
1120 // for all column dimensions
1121 foreach ($sheet->getColumnDimensions() as $columnDimension) {
1122 $columnDimension->setXfIndex( $map[$columnDimension->getXfIndex()] );
1123 }
1124
1125 // also do garbage collection for all the sheets
1126 $sheet->garbageCollect();
1127 }
1128 }
1129
1135 public function getID() {
1136 return $this->_uniqueID;
1137 }
1138
1139}
$worksheet
An exception for terminatinating execution or to throw for unit testing.
static getInstance(PHPExcel $workbook=NULL)
Get an instance of this class.
static unsetInstance(PHPExcel $workbook=NULL)
Unset an instance of this class.
getName()
Get name.
Definition: NamedRange.php:104
getScope()
Get scope.
Definition: NamedRange.php:206
setIndex($pValue)
Set own index in style collection.
Definition: Style.php:663
getCell($pCoordinate='A1')
Get cell at a specific coordinate.
Definition: Worksheet.php:1153
getHashCode()
Get hash code.
Definition: Worksheet.php:2632
rebindParent(PHPExcel $parent)
Re-bind parent.
Definition: Worksheet.php:796
getTitle()
Get title.
Definition: Worksheet.php:817
getCellCollection($pSorted=true)
Get collection of cells.
Definition: Worksheet.php:484
getParent()
Get parent.
Definition: Worksheet.php:786
setActiveSheetIndex($pIndex=0)
Set active sheet index.
Definition: PHPExcel.php:683
$_namedRanges
Definition: PHPExcel.php:92
getWorksheetIterator()
Get worksheet iterator.
Definition: PHPExcel.php:839
removeNamedRange($namedRange, PHPExcel_Worksheet $pSheet=null)
Remove named range.
Definition: PHPExcel.php:821
garbageCollect()
Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells and columns in the work...
Definition: PHPExcel.php:1052
getDefaultStyle()
Get default style.
Definition: PHPExcel.php:925
_getExtensionOnly($ThePath)
return the extension of a filename.
Definition: PHPExcel.php:275
getCellStyleXfByHashCode($pValue='')
Get cellStyleXf by hash code.
Definition: PHPExcel.php:1012
hasRibbon()
This workbook have a custom UI ?
Definition: PHPExcel.php:312
sheetNameExists($pSheetName)
Check if a sheet with a specified name already exists.
Definition: PHPExcel.php:492
addCellXf(PHPExcel_Style $style)
Add a cellXf to the workbook.
Definition: PHPExcel.php:938
discardMacros()
Remove all macros, certificate from spreadsheet.
Definition: PHPExcel.php:220
cellXfExists($pCellStyle=null)
Check if style exists in style collection.
Definition: PHPExcel.php:914
addExternalSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex=null)
Add external sheet.
Definition: PHPExcel.php:738
hasMacrosCertificate()
Is the project signed ?
Definition: PHPExcel.php:201
getAllSheets()
Get all sheets.
Definition: PHPExcel.php:590
getID()
Return the unique ID value assigned to this spreadsheet workbook.
Definition: PHPExcel.php:1135
setRibbonBinObjects($BinObjectsNames=NULL, $BinObjectsData=NULL)
store binaries ribbon objects (pictures)
Definition: PHPExcel.php:264
getSheetCount()
Get sheet count.
Definition: PHPExcel.php:661
disconnectWorksheets()
Disconnect all worksheets from this PHPExcel workbook object, typically so that the PHPExcel object c...
Definition: PHPExcel.php:399
getSheetByName($pName='')
Get sheet by name.
Definition: PHPExcel.php:601
$_ribbonBinObjects
Definition: PHPExcel.php:148
createSheet($iSheetIndex=NULL)
Create sheet and add it to this workbook.
Definition: PHPExcel.php:479
hasMacros()
The workbook has macros ?
Definition: PHPExcel.php:155
getNamedRanges()
Get named ranges.
Definition: PHPExcel.php:768
getActiveSheetIndex()
Get active sheet index.
Definition: PHPExcel.php:671
$_cellXfCollection
Definition: PHPExcel.php:106
$_macrosCertificate
Definition: PHPExcel.php:133
$_activeSheetIndex
Definition: PHPExcel.php:85
$_calculationEngine
Definition: PHPExcel.php:78
removeCellStyleXfByIndex($pIndex=0)
Remove cellStyleXf by index.
Definition: PHPExcel.php:1039
getSecurity()
Get security.
Definition: PHPExcel.php:445
setHasMacros($hasMacros=false)
Define if a workbook has macros.
Definition: PHPExcel.php:164
getCellXfCollection()
Get the workbook collection of cellXfs.
Definition: PHPExcel.php:876
copy()
Copy workbook (!= clone!)
Definition: PHPExcel.php:848
$_cellXfSupervisor
Definition: PHPExcel.php:99
getCellXfByHashCode($pValue='')
Get cellXf by hash code.
Definition: PHPExcel.php:898
setMacrosCertificate($Certificate=NULL)
Set the macros certificate.
Definition: PHPExcel.php:192
sheetCodeNameExists($pSheetCodeName)
Check if a sheet with a specified code name already exists.
Definition: PHPExcel.php:331
setProperties(PHPExcel_DocumentProperties $pValue)
Set properties.
Definition: PHPExcel.php:435
__destruct()
Code to execute when this worksheet is unset()
Definition: PHPExcel.php:389
getRibbonXMLData($What='all')
retrieve ribbon XML Data
Definition: PHPExcel.php:243
getActiveSheet()
Get active sheet.
Definition: PHPExcel.php:467
$_properties
Definition: PHPExcel.php:57
getCellStyleXfCollection()
Get the workbook collection of cellStyleXfs.
Definition: PHPExcel.php:990
addNamedRange(PHPExcel_NamedRange $namedRange)
Add named range.
Definition: PHPExcel.php:778
getCalculationEngine()
Return the calculation engine for this worksheet.
Definition: PHPExcel.php:415
setIndexByName($sheetName, $newIndex)
Set index for sheet by sheet name.
Definition: PHPExcel.php:639
setRibbonXMLData($Target=NULL, $XMLData=NULL)
set ribbon XML data
Definition: PHPExcel.php:230
$_workSheetCollection
Definition: PHPExcel.php:71
removeCellXfByIndex($pIndex=0)
Remove cellXf by index.
Definition: PHPExcel.php:950
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition: PHPExcel.php:863
getSheetByCodeName($pName='')
Get sheet by code name.
Definition: PHPExcel.php:342
setSecurity(PHPExcel_DocumentSecurity $pValue)
Set security.
Definition: PHPExcel.php:455
$_cellStyleXfCollection
Definition: PHPExcel.php:113
getMacrosCertificate()
Return the macros certificate.
Definition: PHPExcel.php:210
setMacrosCode($MacrosCode)
Set the macros code.
Definition: PHPExcel.php:173
getIndex(PHPExcel_Worksheet $pSheet)
Get index for sheet.
Definition: PHPExcel.php:620
getCellXfSupervisor()
Get the cellXf supervisor.
Definition: PHPExcel.php:980
addCellStyleXf(PHPExcel_Style $pStyle)
Add a cellStyleXf to the workbook.
Definition: PHPExcel.php:1027
__construct()
Create a new PHPExcel with one Worksheet.
Definition: PHPExcel.php:357
addSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex=NULL)
Add sheet.
Definition: PHPExcel.php:505
getSheetNames()
Get sheet names.
Definition: PHPExcel.php:719
getRibbonBinObjects($What='all')
retrieve Binaries Ribbon Objects
Definition: PHPExcel.php:283
getCellXfByIndex($pIndex=0)
Get cellXf by index.
Definition: PHPExcel.php:887
$_ribbonXMLData
Definition: PHPExcel.php:140
removeSheetByIndex($pIndex=0)
Remove sheet by index.
Definition: PHPExcel.php:546
getCellStyleXfByIndex($pIndex=0)
Get cellStyleXf by index.
Definition: PHPExcel.php:1001
getProperties()
Get properties.
Definition: PHPExcel.php:425
getNamedRange($namedRange, PHPExcel_Worksheet $pSheet=null)
Get named range.
Definition: PHPExcel.php:796
getMacrosCode()
Return the macros code.
Definition: PHPExcel.php:183
getSheet($pIndex=0)
Get sheet by index.
Definition: PHPExcel.php:573
setActiveSheetIndexByName($pValue='')
Set active sheet index by name.
Definition: PHPExcel.php:704
hasRibbonBinObjects()
This workbook have additionnal object for the ribbon ?
Definition: PHPExcel.php:321
$key
Definition: croninfo.php:18
$i
Definition: disco.tpl.php:19
$style
Definition: example_012.php:70
$index
Definition: metadata.php:60
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27