ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_Worksheet_PageSetup Class Reference
+ Collaboration diagram for PHPExcel_Worksheet_PageSetup:

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_PageSetup. More...
 
 getPaperSize ()
 Get Paper Size. More...
 
 setPaperSize ($pValue=PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER)
 Set Paper Size. More...
 
 getOrientation ()
 Get Orientation. More...
 
 setOrientation ($pValue=PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT)
 Set Orientation. More...
 
 getScale ()
 Get Scale. More...
 
 setScale ($pValue=100, $pUpdate=true)
 Set Scale. More...
 
 getFitToPage ()
 Get Fit To Page. More...
 
 setFitToPage ($pValue=TRUE)
 Set Fit To Page. More...
 
 getFitToHeight ()
 Get Fit To Height. More...
 
 setFitToHeight ($pValue=1, $pUpdate=TRUE)
 Set Fit To Height. More...
 
 getFitToWidth ()
 Get Fit To Width. More...
 
 setFitToWidth ($pValue=1, $pUpdate=TRUE)
 Set Fit To Width. More...
 
 isColumnsToRepeatAtLeftSet ()
 Is Columns to repeat at left set? More...
 
 getColumnsToRepeatAtLeft ()
 Get Columns to repeat at left. More...
 
 setColumnsToRepeatAtLeft ($pValue=null)
 Set Columns to repeat at left. More...
 
 setColumnsToRepeatAtLeftByStartAndEnd ($pStart='A', $pEnd='A')
 Set Columns to repeat at left by start and end. More...
 
 isRowsToRepeatAtTopSet ()
 Is Rows to repeat at top set? More...
 
 getRowsToRepeatAtTop ()
 Get Rows to repeat at top. More...
 
 setRowsToRepeatAtTop ($pValue=null)
 Set Rows to repeat at top. More...
 
 setRowsToRepeatAtTopByStartAndEnd ($pStart=1, $pEnd=1)
 Set Rows to repeat at top by start and end. More...
 
 getHorizontalCentered ()
 Get center page horizontally. More...
 
 setHorizontalCentered ($value=false)
 Set center page horizontally. More...
 
 getVerticalCentered ()
 Get center page vertically. More...
 
 setVerticalCentered ($value=false)
 Set center page vertically. More...
 
 getPrintArea ($index=0)
 Get print area. More...
 
 isPrintAreaSet ($index=0)
 Is print area set? More...
 
 clearPrintArea ($index=0)
 Clear a print area. More...
 
 setPrintArea ($value, $index=0, $method=self::SETPRINTRANGE_OVERWRITE)
 Set print area. More...
 
 addPrintArea ($value, $index=-1)
 Add a new print area (e.g. More...
 
 setPrintAreaByColumnAndRow ($column1, $row1, $column2, $row2, $index=0, $method=self::SETPRINTRANGE_OVERWRITE)
 Set print area. More...
 
 addPrintAreaByColumnAndRow ($column1, $row1, $column2, $row2, $index=-1)
 Add a new print area to the list of print areas. More...
 
 getFirstPageNumber ()
 Get first page number. More...
 
 setFirstPageNumber ($value=null)
 Set first page number. More...
 
 resetFirstPageNumber ()
 Reset first page number. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 

Data Fields

const PAPERSIZE_LETTER = 1
 
const PAPERSIZE_LETTER_SMALL = 2
 
const PAPERSIZE_TABLOID = 3
 
const PAPERSIZE_LEDGER = 4
 
const PAPERSIZE_LEGAL = 5
 
const PAPERSIZE_STATEMENT = 6
 
const PAPERSIZE_EXECUTIVE = 7
 
const PAPERSIZE_A3 = 8
 
const PAPERSIZE_A4 = 9
 
const PAPERSIZE_A4_SMALL = 10
 
const PAPERSIZE_A5 = 11
 
const PAPERSIZE_B4 = 12
 
const PAPERSIZE_B5 = 13
 
const PAPERSIZE_FOLIO = 14
 
const PAPERSIZE_QUARTO = 15
 
const PAPERSIZE_STANDARD_1 = 16
 
const PAPERSIZE_STANDARD_2 = 17
 
const PAPERSIZE_NOTE = 18
 
const PAPERSIZE_NO9_ENVELOPE = 19
 
const PAPERSIZE_NO10_ENVELOPE = 20
 
const PAPERSIZE_NO11_ENVELOPE = 21
 
const PAPERSIZE_NO12_ENVELOPE = 22
 
const PAPERSIZE_NO14_ENVELOPE = 23
 
const PAPERSIZE_C = 24
 
const PAPERSIZE_D = 25
 
const PAPERSIZE_E = 26
 
const PAPERSIZE_DL_ENVELOPE = 27
 
const PAPERSIZE_C5_ENVELOPE = 28
 
const PAPERSIZE_C3_ENVELOPE = 29
 
const PAPERSIZE_C4_ENVELOPE = 30
 
const PAPERSIZE_C6_ENVELOPE = 31
 
const PAPERSIZE_C65_ENVELOPE = 32
 
const PAPERSIZE_B4_ENVELOPE = 33
 
const PAPERSIZE_B5_ENVELOPE = 34
 
const PAPERSIZE_B6_ENVELOPE = 35
 
const PAPERSIZE_ITALY_ENVELOPE = 36
 
const PAPERSIZE_MONARCH_ENVELOPE = 37
 
const PAPERSIZE_6_3_4_ENVELOPE = 38
 
const PAPERSIZE_US_STANDARD_FANFOLD = 39
 
const PAPERSIZE_GERMAN_STANDARD_FANFOLD = 40
 
const PAPERSIZE_GERMAN_LEGAL_FANFOLD = 41
 
const PAPERSIZE_ISO_B4 = 42
 
const PAPERSIZE_JAPANESE_DOUBLE_POSTCARD = 43
 
const PAPERSIZE_STANDARD_PAPER_1 = 44
 
const PAPERSIZE_STANDARD_PAPER_2 = 45
 
const PAPERSIZE_STANDARD_PAPER_3 = 46
 
const PAPERSIZE_INVITE_ENVELOPE = 47
 
const PAPERSIZE_LETTER_EXTRA_PAPER = 48
 
const PAPERSIZE_LEGAL_EXTRA_PAPER = 49
 
const PAPERSIZE_TABLOID_EXTRA_PAPER = 50
 
const PAPERSIZE_A4_EXTRA_PAPER = 51
 
const PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52
 
const PAPERSIZE_A4_TRANSVERSE_PAPER = 53
 
const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54
 
const PAPERSIZE_SUPERA_SUPERA_A4_PAPER = 55
 
const PAPERSIZE_SUPERB_SUPERB_A3_PAPER = 56
 
const PAPERSIZE_LETTER_PLUS_PAPER = 57
 
const PAPERSIZE_A4_PLUS_PAPER = 58
 
const PAPERSIZE_A5_TRANSVERSE_PAPER = 59
 
const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60
 
const PAPERSIZE_A3_EXTRA_PAPER = 61
 
const PAPERSIZE_A5_EXTRA_PAPER = 62
 
const PAPERSIZE_ISO_B5_EXTRA_PAPER = 63
 
const PAPERSIZE_A2_PAPER = 64
 
const PAPERSIZE_A3_TRANSVERSE_PAPER = 65
 
const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66
 
const ORIENTATION_DEFAULT = 'default'
 
const ORIENTATION_LANDSCAPE = 'landscape'
 
const ORIENTATION_PORTRAIT = 'portrait'
 
const SETPRINTRANGE_OVERWRITE = 'O'
 
const SETPRINTRANGE_INSERT = 'I'
 

Private Attributes

 $_paperSize = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER
 
 $_orientation = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT
 
 $_scale = 100
 
 $_fitToPage = FALSE
 
 $_fitToHeight = 1
 
 $_fitToWidth = 1
 
 $_columnsToRepeatAtLeft = array('', '')
 
 $_rowsToRepeatAtTop = array(0, 0)
 
 $_horizontalCentered = FALSE
 
 $_verticalCentered = FALSE
 
 $_printArea = NULL
 
 $_firstPageNumber = NULL
 

Detailed Description

Definition at line 107 of file PageSetup.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Worksheet_PageSetup::__construct ( )

Create a new PHPExcel_Worksheet_PageSetup.

Definition at line 280 of file PageSetup.php.

281  {
282  }

Member Function Documentation

◆ __clone()

PHPExcel_Worksheet_PageSetup::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Definition at line 788 of file PageSetup.php.

788  {
789  $vars = get_object_vars($this);
790  foreach ($vars as $key => $value) {
791  if (is_object($value)) {
792  $this->$key = clone $value;
793  } else {
794  $this->$key = $value;
795  }
796  }
797  }

◆ addPrintArea()

PHPExcel_Worksheet_PageSetup::addPrintArea (   $value,
  $index = -1 
)

Add a new print area (e.g.

'A1:D10' or 'A1:D10,G5:M20') to the list of print areas

Parameters
string$value
int$indexIdentifier 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
Returns
PHPExcel_Worksheet_PageSetup
Exceptions
PHPExcel_Exception

Definition at line 703 of file PageSetup.php.

References setPrintArea().

703  {
704  return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT);
705  }
setPrintArea($value, $index=0, $method=self::SETPRINTRANGE_OVERWRITE)
Set print area.
Definition: PageSetup.php:645
+ Here is the call graph for this function:

◆ addPrintAreaByColumnAndRow()

PHPExcel_Worksheet_PageSetup::addPrintAreaByColumnAndRow (   $column1,
  $row1,
  $column2,
  $row2,
  $index = -1 
)

Add a new print area to the list of print areas.

Parameters
int$column1Start Column for the print area
int$row1Start Row for the print area
int$column2End Column for the print area
int$row2End Row for the print area
int$indexIdentifier 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
Returns
PHPExcel_Worksheet_PageSetup
Exceptions
PHPExcel_Exception

Definition at line 751 of file PageSetup.php.

References setPrintArea(), and PHPExcel_Cell\stringFromColumnIndex().

752  {
753  return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, self::SETPRINTRANGE_INSERT);
754  }
setPrintArea($value, $index=0, $method=self::SETPRINTRANGE_OVERWRITE)
Set print area.
Definition: PageSetup.php:645
static stringFromColumnIndex($pColumnIndex=0)
String from columnindex.
Definition: Cell.php:825
+ Here is the call graph for this function:

◆ clearPrintArea()

PHPExcel_Worksheet_PageSetup::clearPrintArea (   $index = 0)

Clear a print area.

Parameters
int$indexIdentifier 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
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 611 of file PageSetup.php.

611  {
612  if ($index == 0) {
613  $this->_printArea = NULL;
614  } else {
615  $printAreas = explode(',',$this->_printArea);
616  if (isset($printAreas[$index-1])) {
617  unset($printAreas[$index-1]);
618  $this->_printArea = implode(',',$printAreas);
619  }
620  }
621 
622  return $this;
623  }

◆ getColumnsToRepeatAtLeft()

PHPExcel_Worksheet_PageSetup::getColumnsToRepeatAtLeft ( )

Get Columns to repeat at left.

Returns
array Containing start column and end column, empty array if option unset

Definition at line 446 of file PageSetup.php.

References $_columnsToRepeatAtLeft.

446  {
448  }

◆ getFirstPageNumber()

PHPExcel_Worksheet_PageSetup::getFirstPageNumber ( )

Get first page number.

Returns
int

Definition at line 761 of file PageSetup.php.

References $_firstPageNumber.

761  {
763  }

◆ getFitToHeight()

PHPExcel_Worksheet_PageSetup::getFitToHeight ( )

Get Fit To Height.

Returns
int?

Definition at line 383 of file PageSetup.php.

References $_fitToHeight.

383  {
384  return $this->_fitToHeight;
385  }

◆ getFitToPage()

PHPExcel_Worksheet_PageSetup::getFitToPage ( )

Get Fit To Page.

Returns
boolean

Definition at line 363 of file PageSetup.php.

References $_fitToPage.

363  {
364  return $this->_fitToPage;
365  }

◆ getFitToWidth()

PHPExcel_Worksheet_PageSetup::getFitToWidth ( )

Get Fit To Width.

Returns
int?

Definition at line 407 of file PageSetup.php.

References $_fitToWidth.

407  {
408  return $this->_fitToWidth;
409  }

◆ getHorizontalCentered()

PHPExcel_Worksheet_PageSetup::getHorizontalCentered ( )

Get center page horizontally.

Returns
bool

Definition at line 529 of file PageSetup.php.

References $_horizontalCentered.

529  {
531  }

◆ getOrientation()

PHPExcel_Worksheet_PageSetup::getOrientation ( )

Get Orientation.

Returns
string

Definition at line 309 of file PageSetup.php.

References $_orientation.

309  {
310  return $this->_orientation;
311  }

◆ getPaperSize()

PHPExcel_Worksheet_PageSetup::getPaperSize ( )

Get Paper Size.

Returns
int

Definition at line 289 of file PageSetup.php.

References $_paperSize.

289  {
290  return $this->_paperSize;
291  }

◆ getPrintArea()

PHPExcel_Worksheet_PageSetup::getPrintArea (   $index = 0)

Get print area.

Parameters
int$indexIdentifier 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
Exceptions
PHPExcel_Exception
Returns
string

Definition at line 574 of file PageSetup.php.

References $_printArea.

574  {
575  if ($index == 0) {
576  return $this->_printArea;
577  }
578  $printAreas = explode(',',$this->_printArea);
579  if (isset($printAreas[$index-1])) {
580  return $printAreas[$index-1];
581  }
582  throw new PHPExcel_Exception("Requested Print Area does not exist");
583  }

◆ getRowsToRepeatAtTop()

PHPExcel_Worksheet_PageSetup::getRowsToRepeatAtTop ( )

Get Rows to repeat at top.

Returns
array Containing start column and end column, empty array if option unset

Definition at line 495 of file PageSetup.php.

References $_rowsToRepeatAtTop.

495  {
497  }

◆ getScale()

PHPExcel_Worksheet_PageSetup::getScale ( )

Get Scale.

Returns
int?

Definition at line 329 of file PageSetup.php.

References $_scale.

329  {
330  return $this->_scale;
331  }

◆ getVerticalCentered()

PHPExcel_Worksheet_PageSetup::getVerticalCentered ( )

Get center page vertically.

Returns
bool

Definition at line 549 of file PageSetup.php.

References $_verticalCentered.

549  {
551  }

◆ isColumnsToRepeatAtLeftSet()

PHPExcel_Worksheet_PageSetup::isColumnsToRepeatAtLeftSet ( )

Is Columns to repeat at left set?

Returns
boolean

Definition at line 431 of file PageSetup.php.

431  {
432  if (is_array($this->_columnsToRepeatAtLeft)) {
433  if ($this->_columnsToRepeatAtLeft[0] != '' && $this->_columnsToRepeatAtLeft[1] != '') {
434  return true;
435  }
436  }
437 
438  return false;
439  }

◆ isPrintAreaSet()

PHPExcel_Worksheet_PageSetup::isPrintAreaSet (   $index = 0)

Is print area set?

Parameters
int$indexIdentifier 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
Returns
boolean

Definition at line 594 of file PageSetup.php.

594  {
595  if ($index == 0) {
596  return !is_null($this->_printArea);
597  }
598  $printAreas = explode(',',$this->_printArea);
599  return isset($printAreas[$index-1]);
600  }

◆ isRowsToRepeatAtTopSet()

PHPExcel_Worksheet_PageSetup::isRowsToRepeatAtTopSet ( )

Is Rows to repeat at top set?

Returns
boolean

Definition at line 480 of file PageSetup.php.

480  {
481  if (is_array($this->_rowsToRepeatAtTop)) {
482  if ($this->_rowsToRepeatAtTop[0] != 0 && $this->_rowsToRepeatAtTop[1] != 0) {
483  return true;
484  }
485  }
486 
487  return false;
488  }

◆ resetFirstPageNumber()

PHPExcel_Worksheet_PageSetup::resetFirstPageNumber ( )

Reset first page number.

Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 781 of file PageSetup.php.

References setFirstPageNumber().

781  {
782  return $this->setFirstPageNumber(null);
783  }
setFirstPageNumber($value=null)
Set first page number.
Definition: PageSetup.php:771
+ Here is the call graph for this function:

◆ setColumnsToRepeatAtLeft()

PHPExcel_Worksheet_PageSetup::setColumnsToRepeatAtLeft (   $pValue = null)

Set Columns to repeat at left.

Parameters
array$pValueContaining start column and end column, empty array if option unset
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 456 of file PageSetup.php.

456  {
457  if (is_array($pValue)) {
458  $this->_columnsToRepeatAtLeft = $pValue;
459  }
460  return $this;
461  }

◆ setColumnsToRepeatAtLeftByStartAndEnd()

PHPExcel_Worksheet_PageSetup::setColumnsToRepeatAtLeftByStartAndEnd (   $pStart = 'A',
  $pEnd = 'A' 
)

Set Columns to repeat at left by start and end.

Parameters
string$pStart
string$pEnd
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 470 of file PageSetup.php.

References array.

470  {
471  $this->_columnsToRepeatAtLeft = array($pStart, $pEnd);
472  return $this;
473  }
Create styles array
The data for the language used.

◆ setFirstPageNumber()

PHPExcel_Worksheet_PageSetup::setFirstPageNumber (   $value = null)

Set first page number.

Parameters
int$value
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 771 of file PageSetup.php.

Referenced by resetFirstPageNumber().

771  {
772  $this->_firstPageNumber = $value;
773  return $this;
774  }
+ Here is the caller graph for this function:

◆ setFitToHeight()

PHPExcel_Worksheet_PageSetup::setFitToHeight (   $pValue = 1,
  $pUpdate = TRUE 
)

Set Fit To Height.

Parameters
int?$pValue
boolean$pUpdateUpdate fitToPage so it applies rather than scaling
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 394 of file PageSetup.php.

394  {
395  $this->_fitToHeight = $pValue;
396  if ($pUpdate) {
397  $this->_fitToPage = TRUE;
398  }
399  return $this;
400  }

◆ setFitToPage()

PHPExcel_Worksheet_PageSetup::setFitToPage (   $pValue = TRUE)

Set Fit To Page.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 373 of file PageSetup.php.

373  {
374  $this->_fitToPage = $pValue;
375  return $this;
376  }

◆ setFitToWidth()

PHPExcel_Worksheet_PageSetup::setFitToWidth (   $pValue = 1,
  $pUpdate = TRUE 
)

Set Fit To Width.

Parameters
int?$pValue
boolean$pUpdateUpdate fitToPage so it applies rather than scaling
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 418 of file PageSetup.php.

418  {
419  $this->_fitToWidth = $pValue;
420  if ($pUpdate) {
421  $this->_fitToPage = TRUE;
422  }
423  return $this;
424  }

◆ setHorizontalCentered()

PHPExcel_Worksheet_PageSetup::setHorizontalCentered (   $value = false)

Set center page horizontally.

Parameters
bool$value
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 539 of file PageSetup.php.

539  {
540  $this->_horizontalCentered = $value;
541  return $this;
542  }

◆ setOrientation()

PHPExcel_Worksheet_PageSetup::setOrientation (   $pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT)

Set Orientation.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 319 of file PageSetup.php.

319  {
320  $this->_orientation = $pValue;
321  return $this;
322  }

◆ setPaperSize()

PHPExcel_Worksheet_PageSetup::setPaperSize (   $pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER)

Set Paper Size.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 299 of file PageSetup.php.

299  {
300  $this->_paperSize = $pValue;
301  return $this;
302  }

◆ setPrintArea()

PHPExcel_Worksheet_PageSetup::setPrintArea (   $value,
  $index = 0,
  $method = self::SETPRINTRANGE_OVERWRITE 
)

Set print area.

e.g. 'A1:D10' or 'A1:D10,G5:M20'

Parameters
string$value
int$indexIdentifier 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 all 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
string$methodDetermines 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
Returns
PHPExcel_Worksheet_PageSetup
Exceptions
PHPExcel_Exception

Definition at line 645 of file PageSetup.php.

References array.

Referenced by addPrintArea(), addPrintAreaByColumnAndRow(), and setPrintAreaByColumnAndRow().

645  {
646  if (strpos($value,'!') !== false) {
647  throw new PHPExcel_Exception('Cell coordinate must not specify a worksheet.');
648  } elseif (strpos($value,':') === false) {
649  throw new PHPExcel_Exception('Cell coordinate must be a range of cells.');
650  } elseif (strpos($value,'$') !== false) {
651  throw new PHPExcel_Exception('Cell coordinate must not be absolute.');
652  }
653  $value = strtoupper($value);
654 
655  if ($method == self::SETPRINTRANGE_OVERWRITE) {
656  if ($index == 0) {
657  $this->_printArea = $value;
658  } else {
659  $printAreas = explode(',',$this->_printArea);
660  if($index < 0) {
661  $index = count($printAreas) - abs($index) + 1;
662  }
663  if (($index <= 0) || ($index > count($printAreas))) {
664  throw new PHPExcel_Exception('Invalid index for setting print range.');
665  }
666  $printAreas[$index-1] = $value;
667  $this->_printArea = implode(',',$printAreas);
668  }
669  } elseif($method == self::SETPRINTRANGE_INSERT) {
670  if ($index == 0) {
671  $this->_printArea .= ($this->_printArea == '') ? $value : ','.$value;
672  } else {
673  $printAreas = explode(',',$this->_printArea);
674  if($index < 0) {
675  $index = abs($index) - 1;
676  }
677  if ($index > count($printAreas)) {
678  throw new PHPExcel_Exception('Invalid index for setting print range.');
679  }
680  $printAreas = array_merge(array_slice($printAreas,0,$index),array($value),array_slice($printAreas,$index));
681  $this->_printArea = implode(',',$printAreas);
682  }
683  } else {
684  throw new PHPExcel_Exception('Invalid method for setting print range.');
685  }
686 
687  return $this;
688  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ setPrintAreaByColumnAndRow()

PHPExcel_Worksheet_PageSetup::setPrintAreaByColumnAndRow (   $column1,
  $row1,
  $column2,
  $row2,
  $index = 0,
  $method = self::SETPRINTRANGE_OVERWRITE 
)

Set print area.

Parameters
int$column1Column 1
int$row1Row 1
int$column2Column 2
int$row2Row 2
int$indexIdentifier 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 all 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
string$methodDetermines 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
Returns
PHPExcel_Worksheet_PageSetup
Exceptions
PHPExcel_Exception

Definition at line 730 of file PageSetup.php.

References setPrintArea(), and PHPExcel_Cell\stringFromColumnIndex().

731  {
732  return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, $method);
733  }
setPrintArea($value, $index=0, $method=self::SETPRINTRANGE_OVERWRITE)
Set print area.
Definition: PageSetup.php:645
static stringFromColumnIndex($pColumnIndex=0)
String from columnindex.
Definition: Cell.php:825
+ Here is the call graph for this function:

◆ setRowsToRepeatAtTop()

PHPExcel_Worksheet_PageSetup::setRowsToRepeatAtTop (   $pValue = null)

Set Rows to repeat at top.

Parameters
array$pValueContaining start column and end column, empty array if option unset
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 505 of file PageSetup.php.

505  {
506  if (is_array($pValue)) {
507  $this->_rowsToRepeatAtTop = $pValue;
508  }
509  return $this;
510  }

◆ setRowsToRepeatAtTopByStartAndEnd()

PHPExcel_Worksheet_PageSetup::setRowsToRepeatAtTopByStartAndEnd (   $pStart = 1,
  $pEnd = 1 
)

Set Rows to repeat at top by start and end.

Parameters
int$pStart
int$pEnd
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 519 of file PageSetup.php.

References array.

519  {
520  $this->_rowsToRepeatAtTop = array($pStart, $pEnd);
521  return $this;
522  }
Create styles array
The data for the language used.

◆ setScale()

PHPExcel_Worksheet_PageSetup::setScale (   $pValue = 100,
  $pUpdate = true 
)

Set Scale.

Print scaling. Valid values range from 10 to 400 This setting is overridden when fitToWidth and/or fitToHeight are in use

Parameters
int?$pValue
boolean$pUpdateUpdate fitToPage so scaling applies rather than fitToHeight / fitToWidth
Returns
PHPExcel_Worksheet_PageSetup
Exceptions
PHPExcel_Exception

Definition at line 344 of file PageSetup.php.

344  {
345  // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface,
346  // but it is apparently still able to handle any scale >= 0, where 0 results in 100
347  if (($pValue >= 0) || is_null($pValue)) {
348  $this->_scale = $pValue;
349  if ($pUpdate) {
350  $this->_fitToPage = false;
351  }
352  } else {
353  throw new PHPExcel_Exception("Scale must not be negative");
354  }
355  return $this;
356  }

◆ setVerticalCentered()

PHPExcel_Worksheet_PageSetup::setVerticalCentered (   $value = false)

Set center page vertically.

Parameters
bool$value
Returns
PHPExcel_Worksheet_PageSetup

Definition at line 559 of file PageSetup.php.

559  {
560  $this->_verticalCentered = $value;
561  return $this;
562  }

Field Documentation

◆ $_columnsToRepeatAtLeft

PHPExcel_Worksheet_PageSetup::$_columnsToRepeatAtLeft = array('', '')
private

Definition at line 240 of file PageSetup.php.

Referenced by getColumnsToRepeatAtLeft().

◆ $_firstPageNumber

PHPExcel_Worksheet_PageSetup::$_firstPageNumber = NULL
private

Definition at line 275 of file PageSetup.php.

Referenced by getFirstPageNumber().

◆ $_fitToHeight

PHPExcel_Worksheet_PageSetup::$_fitToHeight = 1
private

Definition at line 225 of file PageSetup.php.

Referenced by getFitToHeight().

◆ $_fitToPage

PHPExcel_Worksheet_PageSetup::$_fitToPage = FALSE
private

Definition at line 217 of file PageSetup.php.

Referenced by getFitToPage().

◆ $_fitToWidth

PHPExcel_Worksheet_PageSetup::$_fitToWidth = 1
private

Definition at line 233 of file PageSetup.php.

Referenced by getFitToWidth().

◆ $_horizontalCentered

PHPExcel_Worksheet_PageSetup::$_horizontalCentered = FALSE
private

Definition at line 254 of file PageSetup.php.

Referenced by getHorizontalCentered().

◆ $_orientation

PHPExcel_Worksheet_PageSetup::$_orientation = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT
private

Definition at line 199 of file PageSetup.php.

Referenced by getOrientation().

◆ $_paperSize

PHPExcel_Worksheet_PageSetup::$_paperSize = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER
private

Definition at line 192 of file PageSetup.php.

Referenced by getPaperSize().

◆ $_printArea

PHPExcel_Worksheet_PageSetup::$_printArea = NULL
private

Definition at line 268 of file PageSetup.php.

Referenced by getPrintArea().

◆ $_rowsToRepeatAtTop

PHPExcel_Worksheet_PageSetup::$_rowsToRepeatAtTop = array(0, 0)
private

Definition at line 247 of file PageSetup.php.

Referenced by getRowsToRepeatAtTop().

◆ $_scale

PHPExcel_Worksheet_PageSetup::$_scale = 100
private

Definition at line 209 of file PageSetup.php.

Referenced by getScale().

◆ $_verticalCentered

PHPExcel_Worksheet_PageSetup::$_verticalCentered = FALSE
private

Definition at line 261 of file PageSetup.php.

Referenced by getVerticalCentered().

◆ ORIENTATION_DEFAULT

const PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT = 'default'

◆ ORIENTATION_LANDSCAPE

◆ ORIENTATION_PORTRAIT

const PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT = 'portrait'

◆ PAPERSIZE_6_3_4_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_6_3_4_ENVELOPE = 38

Definition at line 147 of file PageSetup.php.

◆ PAPERSIZE_A2_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A2_PAPER = 64

Definition at line 173 of file PageSetup.php.

◆ PAPERSIZE_A3

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3 = 8

Definition at line 117 of file PageSetup.php.

◆ PAPERSIZE_A3_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_PAPER = 61

Definition at line 170 of file PageSetup.php.

◆ PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66

Definition at line 175 of file PageSetup.php.

◆ PAPERSIZE_A3_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER = 65

Definition at line 174 of file PageSetup.php.

◆ PAPERSIZE_A4

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4 = 9

Definition at line 118 of file PageSetup.php.

◆ PAPERSIZE_A4_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_EXTRA_PAPER = 51

Definition at line 160 of file PageSetup.php.

◆ PAPERSIZE_A4_PLUS_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_PLUS_PAPER = 58

Definition at line 167 of file PageSetup.php.

◆ PAPERSIZE_A4_SMALL

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_SMALL = 10

Definition at line 119 of file PageSetup.php.

◆ PAPERSIZE_A4_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER = 53

Definition at line 162 of file PageSetup.php.

◆ PAPERSIZE_A5

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5 = 11

Definition at line 120 of file PageSetup.php.

◆ PAPERSIZE_A5_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_EXTRA_PAPER = 62

Definition at line 171 of file PageSetup.php.

◆ PAPERSIZE_A5_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER = 59

Definition at line 168 of file PageSetup.php.

◆ PAPERSIZE_B4

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_B4 = 12

Definition at line 121 of file PageSetup.php.

◆ PAPERSIZE_B4_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_B4_ENVELOPE = 33

Definition at line 142 of file PageSetup.php.

◆ PAPERSIZE_B5

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_B5 = 13

Definition at line 122 of file PageSetup.php.

◆ PAPERSIZE_B5_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_B5_ENVELOPE = 34

Definition at line 143 of file PageSetup.php.

◆ PAPERSIZE_B6_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_B6_ENVELOPE = 35

Definition at line 144 of file PageSetup.php.

◆ PAPERSIZE_C

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_C = 24

Definition at line 133 of file PageSetup.php.

◆ PAPERSIZE_C3_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_C3_ENVELOPE = 29

Definition at line 138 of file PageSetup.php.

◆ PAPERSIZE_C4_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_C4_ENVELOPE = 30

Definition at line 139 of file PageSetup.php.

◆ PAPERSIZE_C5_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_C5_ENVELOPE = 28

Definition at line 137 of file PageSetup.php.

◆ PAPERSIZE_C65_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_C65_ENVELOPE = 32

Definition at line 141 of file PageSetup.php.

◆ PAPERSIZE_C6_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_C6_ENVELOPE = 31

Definition at line 140 of file PageSetup.php.

◆ PAPERSIZE_D

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_D = 25

Definition at line 134 of file PageSetup.php.

◆ PAPERSIZE_DL_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_DL_ENVELOPE = 27

Definition at line 136 of file PageSetup.php.

◆ PAPERSIZE_E

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_E = 26

Definition at line 135 of file PageSetup.php.

◆ PAPERSIZE_EXECUTIVE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_EXECUTIVE = 7

Definition at line 116 of file PageSetup.php.

◆ PAPERSIZE_FOLIO

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_FOLIO = 14

Definition at line 123 of file PageSetup.php.

◆ PAPERSIZE_GERMAN_LEGAL_FANFOLD

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD = 41

Definition at line 150 of file PageSetup.php.

◆ PAPERSIZE_GERMAN_STANDARD_FANFOLD

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD = 40

Definition at line 149 of file PageSetup.php.

◆ PAPERSIZE_INVITE_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_INVITE_ENVELOPE = 47

Definition at line 156 of file PageSetup.php.

◆ PAPERSIZE_ISO_B4

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B4 = 42

Definition at line 151 of file PageSetup.php.

◆ PAPERSIZE_ISO_B5_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER = 63

Definition at line 172 of file PageSetup.php.

◆ PAPERSIZE_ITALY_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_ITALY_ENVELOPE = 36

Definition at line 145 of file PageSetup.php.

◆ PAPERSIZE_JAPANESE_DOUBLE_POSTCARD

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD = 43

Definition at line 152 of file PageSetup.php.

◆ PAPERSIZE_JIS_B5_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60

Definition at line 169 of file PageSetup.php.

◆ PAPERSIZE_LEDGER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEDGER = 4

Definition at line 113 of file PageSetup.php.

◆ PAPERSIZE_LEGAL

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL = 5

Definition at line 114 of file PageSetup.php.

◆ PAPERSIZE_LEGAL_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER = 49

Definition at line 158 of file PageSetup.php.

◆ PAPERSIZE_LETTER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER = 1

Definition at line 110 of file PageSetup.php.

◆ PAPERSIZE_LETTER_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER = 48

Definition at line 157 of file PageSetup.php.

◆ PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54

Definition at line 163 of file PageSetup.php.

◆ PAPERSIZE_LETTER_PLUS_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_PLUS_PAPER = 57

Definition at line 166 of file PageSetup.php.

◆ PAPERSIZE_LETTER_SMALL

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_SMALL = 2

Definition at line 111 of file PageSetup.php.

◆ PAPERSIZE_LETTER_TRANSVERSE_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52

Definition at line 161 of file PageSetup.php.

◆ PAPERSIZE_MONARCH_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_MONARCH_ENVELOPE = 37

Definition at line 146 of file PageSetup.php.

◆ PAPERSIZE_NO10_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO10_ENVELOPE = 20

Definition at line 129 of file PageSetup.php.

◆ PAPERSIZE_NO11_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO11_ENVELOPE = 21

Definition at line 130 of file PageSetup.php.

◆ PAPERSIZE_NO12_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO12_ENVELOPE = 22

Definition at line 131 of file PageSetup.php.

◆ PAPERSIZE_NO14_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO14_ENVELOPE = 23

Definition at line 132 of file PageSetup.php.

◆ PAPERSIZE_NO9_ENVELOPE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO9_ENVELOPE = 19

Definition at line 128 of file PageSetup.php.

◆ PAPERSIZE_NOTE

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_NOTE = 18

Definition at line 127 of file PageSetup.php.

◆ PAPERSIZE_QUARTO

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_QUARTO = 15

Definition at line 124 of file PageSetup.php.

◆ PAPERSIZE_STANDARD_1

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_1 = 16

Definition at line 125 of file PageSetup.php.

◆ PAPERSIZE_STANDARD_2

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_2 = 17

Definition at line 126 of file PageSetup.php.

◆ PAPERSIZE_STANDARD_PAPER_1

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_1 = 44

Definition at line 153 of file PageSetup.php.

◆ PAPERSIZE_STANDARD_PAPER_2

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_2 = 45

Definition at line 154 of file PageSetup.php.

◆ PAPERSIZE_STANDARD_PAPER_3

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_3 = 46

Definition at line 155 of file PageSetup.php.

◆ PAPERSIZE_STATEMENT

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_STATEMENT = 6

Definition at line 115 of file PageSetup.php.

◆ PAPERSIZE_SUPERA_SUPERA_A4_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER = 55

Definition at line 164 of file PageSetup.php.

◆ PAPERSIZE_SUPERB_SUPERB_A3_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER = 56

Definition at line 165 of file PageSetup.php.

◆ PAPERSIZE_TABLOID

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID = 3

Definition at line 112 of file PageSetup.php.

◆ PAPERSIZE_TABLOID_EXTRA_PAPER

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER = 50

Definition at line 159 of file PageSetup.php.

◆ PAPERSIZE_US_STANDARD_FANFOLD

const PHPExcel_Worksheet_PageSetup::PAPERSIZE_US_STANDARD_FANFOLD = 39

Definition at line 148 of file PageSetup.php.

◆ SETPRINTRANGE_INSERT

const PHPExcel_Worksheet_PageSetup::SETPRINTRANGE_INSERT = 'I'

Definition at line 184 of file PageSetup.php.

◆ SETPRINTRANGE_OVERWRITE

const PHPExcel_Worksheet_PageSetup::SETPRINTRANGE_OVERWRITE = 'O'

Definition at line 183 of file PageSetup.php.


The documentation for this class was generated from the following file: