Documentation

Spreadsheet
in package
implements JsonSerializable

Table of Contents

Interfaces

JsonSerializable

Constants

VISIBILITY_HIDDEN  = 'hidden'
VISIBILITY_VERY_HIDDEN  = 'veryHidden'
VISIBILITY_VISIBLE  = 'visible'
DEFINED_NAME_IS_FORMULA  = true
DEFINED_NAME_IS_RANGE  = false
WORKBOOK_VIEW_VISIBILITY_VALUES  = [self::VISIBILITY_VISIBLE, self::VISIBILITY_HIDDEN, self::VISIBILITY_VERY_HIDDEN]

Properties

$activeSheetIndex  : int
Active sheet index.
$autoFilterDateGrouping  : bool
Specifies a boolean value that indicates whether to group dates when presenting the user with filtering optiomd in the user interface.
$calculationEngine  : Calculation|null
Calculation Engine.
$cellStyleXfCollection  : array<string|int, Style>
CellStyleXf collection.
$cellXfCollection  : array<string|int, Style>
CellXf collection.
$cellXfSupervisor  : Style
CellXf supervisor.
$definedNames  : array<string|int, DefinedName>
Named ranges.
$firstSheetIndex  : int
Specifies the index to the first sheet in the book view.
$hasMacros  : bool
hasMacros : this workbook have macros ?
$macrosCertificate  : string|null
macrosCertificate : if macros are signed, contains binary data vbaProjectSignature.bin file, null if not signed.
$macrosCode  : string|null
macrosCode : all macros code as binary data (the vbaProject.bin file, this include form, code, etc.), null if no macro.
$minimized  : bool
Specifies a boolean value that indicates whether the workbook window is minimized.
$properties  : Properties
Document properties.
$ribbonBinObjects  : array<string|int, mixed>|null
ribbonBinObjects : null if workbook is'nt Excel 2007 or not contain embedded objects (picture(s)) for Ribbon Elements ignored if $ribbonXMLData is null.
$ribbonXMLData  : null|array{target: string, data: string}
ribbonXMLData : null if workbook is'nt Excel 2007 or not contain a customized UI.
$security  : Security
Document security.
$showHorizontalScroll  : bool
Controls visibility of the horizonal scroll bar in the application.
$showSheetTabs  : bool
Controls visibility of the sheet tabs in the application.
$showVerticalScroll  : bool
Controls visibility of the horizonal scroll bar in the application.
$tabRatio  : int
Specifies the ratio between the workbook tabs bar and the horizontal scroll bar. TabRatio is assumed to be out of 1000 of the horizontal window width.
$theme  : Theme
$uniqueID  : string
Unique ID.
$unparsedLoadedData  : array<string|int, mixed>
List of unparsed loaded data for export to same format with better compatibility.
$visibility  : string
Specifies the visible status of the workbook.
$workSheetCollection  : array<string|int, Worksheet>
Collection of Worksheet objects.

Methods

__clone()  : mixed
__construct()  : mixed
Create a new PhpSpreadsheet with one Worksheet.
__destruct()  : mixed
Code to execute when this worksheet is unset().
__serialize()  : array<string|int, mixed>
addCellStyleXf()  : void
Add a cellStyleXf to the workbook.
addCellXf()  : void
Add a cellXf to the workbook.
addDefinedName()  : void
Add a defined name (either a named range or a named formula).
addExternalSheet()  : Worksheet
Add external sheet.
addNamedFormula()  : void
Add a named formula.
addNamedRange()  : void
Add a named range.
addSheet()  : Worksheet
Add sheet.
cellXfExists()  : bool
Check if style exists in style collection.
copy()  : self
Copy workbook (!= clone!).
createSheet()  : Worksheet
Create sheet and add it to this workbook.
discardMacros()  : void
Remove all macros, certificate from spreadsheet.
disconnectWorksheets()  : void
Disconnect all worksheets from this PhpSpreadsheet workbook object, typically so that the PhpSpreadsheet object can be unset.
garbageCollect()  : void
Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells and columns in the workbook.
getActiveSheet()  : Worksheet
Get active sheet.
getActiveSheetIndex()  : int
Get active sheet index.
getAllSheets()  : array<string|int, Worksheet>
Get all sheets.
getAutoFilterDateGrouping()  : bool
Return whether to group dates when presenting the user with filtering optiomd in the user interface.
getCalculationEngine()  : Calculation|null
Return the calculation engine for this worksheet.
getCellStyleXfByHashCode()  : false|Style
Get cellStyleXf by hash code.
getCellStyleXfByIndex()  : Style
Get cellStyleXf by index.
getCellStyleXfCollection()  : array<string|int, Style>
Get the workbook collection of cellStyleXfs.
getCellXfByHashCode()  : false|Style
Get cellXf by hash code.
getCellXfByIndex()  : Style
Get cellXf by index.
getCellXfCollection()  : array<string|int, Style>
Get the workbook collection of cellXfs.
getCellXfSupervisor()  : Style
Get the cellXf supervisor.
getDefaultStyle()  : Style
Get default style.
getDefinedName()  : DefinedName|null
Get named range.
getDefinedNames()  : array<string|int, DefinedName>
Get an array of all Defined Names (both named ranges and named formulae).
getFirstSheetIndex()  : int
Return the first sheet in the book view.
getID()  : string
Return the unique ID value assigned to this spreadsheet workbook.
getIndex()  : int
Get index for sheet.
getMacrosCertificate()  : string|null
Return the macros certificate.
getMacrosCode()  : string|null
Return the macros code.
getMinimized()  : bool
Return whether the workbook window is minimized.
getNamedFormula()  : NamedFormula|null
Get named formula.
getNamedFormulae()  : array<string|int, DefinedName>
Get an array of all Named Formulae.
getNamedRange()  : NamedRange|null
Get named range.
getNamedRanges()  : array<string|int, DefinedName>
Get an array of all Named Ranges.
getProperties()  : Properties
Get properties.
getRibbonBinObjects()  : array<string|int, mixed>|null
retrieve Binaries Ribbon Objects.
getRibbonXMLData()  : null|array<string|int, mixed>|string
retrieve ribbon XML Data.
getSecurity()  : Security
Get security.
getSheet()  : Worksheet
Get sheet by index.
getSheetByCodeName()  : Worksheet|null
Get sheet by code name. Warning : sheet don't have always a code name !
getSheetByName()  : Worksheet|null
Get sheet by name.
getSheetByNameOrThrow()  : Worksheet
Get sheet by name, throwing exception if not found.
getSheetCount()  : int
Get sheet count.
getSheetNames()  : array<string|int, string>
Get sheet names.
getShowHorizontalScroll()  : bool
Get the visibility of the horizonal scroll bar in the application.
getShowSheetTabs()  : bool
Get the visibility of the sheet tabs in the application.
getShowVerticalScroll()  : bool
Get the visibility of the vertical scroll bar in the application.
getTableByName()  : Table|null
getTabRatio()  : int
Get the ratio between the workbook tabs bar and the horizontal scroll bar.
getTheme()  : Theme
getVisibility()  : string
Return the visibility status of the workbook.
getWorksheetIterator()  : Iterator
Get worksheet iterator.
hasMacros()  : bool
The workbook has macros ?
hasMacrosCertificate()  : bool
Is the project signed ?
hasRibbon()  : bool
This workbook have a custom UI ?
hasRibbonBinObjects()  : bool
This workbook have additionnal object for the ribbon ?
jsonSerialize()  : mixed
reevaluateAutoFilters()  : void
removeCellStyleXfByIndex()  : void
Remove cellStyleXf by index.
removeCellXfByIndex()  : void
Remove cellXf by index. It is ensured that all cells get their xf index updated.
removeDefinedName()  : $this
Remove defined name.
removeNamedFormula()  : $this
Remove named formula.
removeNamedRange()  : $this
Remove named range.
removeSheetByIndex()  : void
Remove sheet by index.
resetThemeFonts()  : void
setActiveSheetIndex()  : Worksheet
Set active sheet index.
setActiveSheetIndexByName()  : Worksheet
Set active sheet index by name.
setAutoFilterDateGrouping()  : void
Set whether to group dates when presenting the user with filtering optiomd in the user interface.
setFirstSheetIndex()  : void
Set the first sheet in the book view.
setHasMacros()  : void
Define if a workbook has macros.
setIndexByName()  : int
Set index for sheet by sheet name.
setMacrosCertificate()  : void
Set the macros certificate.
setMacrosCode()  : void
Set the macros code.
setMinimized()  : void
Set whether the workbook window is minimized.
setProperties()  : void
Set properties.
setRibbonBinObjects()  : void
store binaries ribbon objects (pictures).
setRibbonXMLData()  : void
set ribbon XML data.
setSecurity()  : void
Set security.
setShowHorizontalScroll()  : void
Set the visibility of the horizonal scroll bar in the application.
setShowSheetTabs()  : void
Set the visibility of the sheet tabs in the application.
setShowVerticalScroll()  : void
Set the visibility of the vertical scroll bar in the application.
setTabRatio()  : void
Set the ratio between the workbook tabs bar and the horizontal scroll bar TabRatio is assumed to be out of 1000 of the horizontal window width.
setVisibility()  : void
Set the visibility status of the workbook.
sheetCodeNameExists()  : bool
Check if a sheet with a specified code name already exists.
sheetNameExists()  : bool
Check if a sheet with a specified name already exists.
getGlobalDefinedNameByType()  : DefinedName|null
getLocalDefinedNameByType()  : DefinedName|null

Constants

VISIBILITY_HIDDEN

public mixed VISIBILITY_HIDDEN = 'hidden'

VISIBILITY_VERY_HIDDEN

public mixed VISIBILITY_VERY_HIDDEN = 'veryHidden'

VISIBILITY_VISIBLE

public mixed VISIBILITY_VISIBLE = 'visible'

DEFINED_NAME_IS_FORMULA

private mixed DEFINED_NAME_IS_FORMULA = true

DEFINED_NAME_IS_RANGE

private mixed DEFINED_NAME_IS_RANGE = false

WORKBOOK_VIEW_VISIBILITY_VALUES

private mixed WORKBOOK_VIEW_VISIBILITY_VALUES = [self::VISIBILITY_VISIBLE, self::VISIBILITY_HIDDEN, self::VISIBILITY_VERY_HIDDEN]

Properties

$activeSheetIndex

Active sheet index.

private int $activeSheetIndex

$autoFilterDateGrouping

Specifies a boolean value that indicates whether to group dates when presenting the user with filtering optiomd in the user interface.

private bool $autoFilterDateGrouping = true

$cellStyleXfCollection

CellStyleXf collection.

private array<string|int, Style> $cellStyleXfCollection = []

$cellXfCollection

CellXf collection.

private array<string|int, Style> $cellXfCollection = []

$firstSheetIndex

Specifies the index to the first sheet in the book view.

private int $firstSheetIndex = 0

$hasMacros

hasMacros : this workbook have macros ?

private bool $hasMacros = false

$macrosCertificate

macrosCertificate : if macros are signed, contains binary data vbaProjectSignature.bin file, null if not signed.

private string|null $macrosCertificate = null

$macrosCode

macrosCode : all macros code as binary data (the vbaProject.bin file, this include form, code, etc.), null if no macro.

private string|null $macrosCode = null

$minimized

Specifies a boolean value that indicates whether the workbook window is minimized.

private bool $minimized = false

$ribbonBinObjects

ribbonBinObjects : null if workbook is'nt Excel 2007 or not contain embedded objects (picture(s)) for Ribbon Elements ignored if $ribbonXMLData is null.

private array<string|int, mixed>|null $ribbonBinObjects = null

$ribbonXMLData

ribbonXMLData : null if workbook is'nt Excel 2007 or not contain a customized UI.

private null|array{target: string, data: string} $ribbonXMLData = null

$showHorizontalScroll

Controls visibility of the horizonal scroll bar in the application.

private bool $showHorizontalScroll = true

$showSheetTabs

Controls visibility of the sheet tabs in the application.

private bool $showSheetTabs = true

$showVerticalScroll

Controls visibility of the horizonal scroll bar in the application.

private bool $showVerticalScroll = true

$tabRatio

Specifies the ratio between the workbook tabs bar and the horizontal scroll bar. TabRatio is assumed to be out of 1000 of the horizontal window width.

private int $tabRatio = 600

$unparsedLoadedData

List of unparsed loaded data for export to same format with better compatibility.

private array<string|int, mixed> $unparsedLoadedData = []

It has to be minimized when the library start to support currently unparsed data.

$visibility

Specifies the visible status of the workbook.

private string $visibility = self::VISIBILITY_VISIBLE

$workSheetCollection

Collection of Worksheet objects.

private array<string|int, Worksheet> $workSheetCollection

Methods

__construct()

Create a new PhpSpreadsheet with one Worksheet.

public __construct() : mixed

__destruct()

Code to execute when this worksheet is unset().

public __destruct() : mixed

__serialize()

public __serialize() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

addCellStyleXf()

Add a cellStyleXf to the workbook.

public addCellStyleXf(Style $style) : void
Parameters
$style : Style

addCellXf()

Add a cellXf to the workbook.

public addCellXf(Style $style) : void
Parameters
$style : Style

addDefinedName()

Add a defined name (either a named range or a named formula).

public addDefinedName(DefinedName $definedName) : void

If a defined named with this name already exists, then this will replace the existing value.

Parameters
$definedName : DefinedName

addExternalSheet()

Add external sheet.

public addExternalSheet(Worksheet $worksheet[, null|int $sheetIndex = null ]) : Worksheet
Parameters
$worksheet : Worksheet

External sheet to add

$sheetIndex : null|int = null

Index where sheet should go (0,1,..., or null for last)

Return values
Worksheet

addNamedFormula()

Add a named formula.

public addNamedFormula(NamedFormula $namedFormula) : void

If a named formula with this name already exists, then this will replace the existing value.

Parameters
$namedFormula : NamedFormula

addNamedRange()

Add a named range.

public addNamedRange(NamedRange $namedRange) : void

If a named range with this name already exists, then this will replace the existing value.

Parameters
$namedRange : NamedRange

addSheet()

Add sheet.

public addSheet(Worksheet $worksheet[, null|int $sheetIndex = null ]) : Worksheet
Parameters
$worksheet : Worksheet

The worksheet to add

$sheetIndex : null|int = null

Index where sheet should go (0,1,..., or null for last)

Return values
Worksheet

cellXfExists()

Check if style exists in style collection.

public cellXfExists(Style $cellStyleIndex) : bool
Parameters
$cellStyleIndex : Style
Return values
bool

copy()

Copy workbook (!= clone!).

public copy() : self
Return values
self

createSheet()

Create sheet and add it to this workbook.

public createSheet([null|int $sheetIndex = null ]) : Worksheet
Parameters
$sheetIndex : null|int = null

Index where sheet should go (0,1,..., or null for last)

Return values
Worksheet

discardMacros()

Remove all macros, certificate from spreadsheet.

public discardMacros() : void

disconnectWorksheets()

Disconnect all worksheets from this PhpSpreadsheet workbook object, typically so that the PhpSpreadsheet object can be unset.

public disconnectWorksheets() : void

garbageCollect()

Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells and columns in the workbook.

public garbageCollect() : void

getActiveSheetIndex()

Get active sheet index.

public getActiveSheetIndex() : int
Return values
int

Active sheet index

getAutoFilterDateGrouping()

Return whether to group dates when presenting the user with filtering optiomd in the user interface.

public getAutoFilterDateGrouping() : bool
Return values
bool

true if workbook window is minimized

getCellStyleXfByHashCode()

Get cellStyleXf by hash code.

public getCellStyleXfByHashCode(string $hashcode) : false|Style
Parameters
$hashcode : string
Return values
false|Style

getCellStyleXfByIndex()

Get cellStyleXf by index.

public getCellStyleXfByIndex(int $cellStyleIndex) : Style
Parameters
$cellStyleIndex : int

Index to cellXf

Return values
Style

getCellStyleXfCollection()

Get the workbook collection of cellStyleXfs.

public getCellStyleXfCollection() : array<string|int, Style>
Return values
array<string|int, Style>

getCellXfByHashCode()

Get cellXf by hash code.

public getCellXfByHashCode(string $hashcode) : false|Style
Parameters
$hashcode : string
Return values
false|Style

getCellXfByIndex()

Get cellXf by index.

public getCellXfByIndex(int $cellStyleIndex) : Style
Parameters
$cellStyleIndex : int
Return values
Style

getCellXfCollection()

Get the workbook collection of cellXfs.

public getCellXfCollection() : array<string|int, Style>
Return values
array<string|int, Style>

getCellXfSupervisor()

Get the cellXf supervisor.

public getCellXfSupervisor() : Style
Return values
Style

getDefinedName()

Get named range.

public getDefinedName(string $definedName[, null|Worksheet $worksheet = null ]) : DefinedName|null
Parameters
$definedName : string
$worksheet : null|Worksheet = null

Scope. Use null for global scope

Return values
DefinedName|null

getDefinedNames()

Get an array of all Defined Names (both named ranges and named formulae).

public getDefinedNames() : array<string|int, DefinedName>
Return values
array<string|int, DefinedName>

getFirstSheetIndex()

Return the first sheet in the book view.

public getFirstSheetIndex() : int
Return values
int

First sheet in book view

getID()

Return the unique ID value assigned to this spreadsheet workbook.

public getID() : string
Return values
string

getMacrosCertificate()

Return the macros certificate.

public getMacrosCertificate() : string|null
Return values
string|null

getMacrosCode()

Return the macros code.

public getMacrosCode() : string|null
Return values
string|null

getMinimized()

Return whether the workbook window is minimized.

public getMinimized() : bool
Return values
bool

true if workbook window is minimized

getNamedFormula()

Get named formula.

public getNamedFormula(string $namedFormula[, null|Worksheet $worksheet = null ]) : NamedFormula|null
Parameters
$namedFormula : string
$worksheet : null|Worksheet = null

Scope. Use null for global scope

Return values
NamedFormula|null

getNamedRange()

Get named range.

public getNamedRange(string $namedRange[, null|Worksheet $worksheet = null ]) : NamedRange|null
Parameters
$namedRange : string
$worksheet : null|Worksheet = null

Scope. Use null for global scope

Return values
NamedRange|null

getRibbonBinObjects()

retrieve Binaries Ribbon Objects.

public getRibbonBinObjects([string $what = 'all' ]) : array<string|int, mixed>|null
Parameters
$what : string = 'all'
Return values
array<string|int, mixed>|null

getRibbonXMLData()

retrieve ribbon XML Data.

public getRibbonXMLData([string $what = 'all' ]) : null|array<string|int, mixed>|string
Parameters
$what : string = 'all'
Return values
null|array<string|int, mixed>|string

getSheet()

Get sheet by index.

public getSheet(int $sheetIndex) : Worksheet
Parameters
$sheetIndex : int

Sheet index

Return values
Worksheet

getSheetByCodeName()

Get sheet by code name. Warning : sheet don't have always a code name !

public getSheetByCodeName(string $codeName) : Worksheet|null
Parameters
$codeName : string

Sheet name

Return values
Worksheet|null

getSheetByName()

Get sheet by name.

public getSheetByName(string $worksheetName) : Worksheet|null
Parameters
$worksheetName : string

Sheet name

Return values
Worksheet|null

getSheetByNameOrThrow()

Get sheet by name, throwing exception if not found.

public getSheetByNameOrThrow(string $worksheetName) : Worksheet
Parameters
$worksheetName : string
Return values
Worksheet

getSheetCount()

Get sheet count.

public getSheetCount() : int
Return values
int

getSheetNames()

Get sheet names.

public getSheetNames() : array<string|int, string>
Return values
array<string|int, string>

getShowHorizontalScroll()

Get the visibility of the horizonal scroll bar in the application.

public getShowHorizontalScroll() : bool
Return values
bool

True if horizonal scroll bar is visible

getShowSheetTabs()

Get the visibility of the sheet tabs in the application.

public getShowSheetTabs() : bool
Return values
bool

True if the sheet tabs are visible

getShowVerticalScroll()

Get the visibility of the vertical scroll bar in the application.

public getShowVerticalScroll() : bool
Return values
bool

True if vertical scroll bar is visible

getTableByName()

public getTableByName(string $tableName) : Table|null
Parameters
$tableName : string
Return values
Table|null

getTabRatio()

Get the ratio between the workbook tabs bar and the horizontal scroll bar.

public getTabRatio() : int

TabRatio is assumed to be out of 1000 of the horizontal window width.

Return values
int

Ratio between the workbook tabs bar and the horizontal scroll bar

getVisibility()

Return the visibility status of the workbook.

public getVisibility() : string

This may be one of the following three values:

  • visibile
Return values
string

Visible status

hasMacros()

The workbook has macros ?

public hasMacros() : bool
Return values
bool

hasMacrosCertificate()

Is the project signed ?

public hasMacrosCertificate() : bool
Return values
bool

true|false

hasRibbon()

This workbook have a custom UI ?

public hasRibbon() : bool
Return values
bool

hasRibbonBinObjects()

This workbook have additionnal object for the ribbon ?

public hasRibbonBinObjects() : bool
Return values
bool

reevaluateAutoFilters()

public reevaluateAutoFilters(bool $resetToMax) : void
Parameters
$resetToMax : bool

removeCellStyleXfByIndex()

Remove cellStyleXf by index.

public removeCellStyleXfByIndex(int $cellStyleIndex) : void
Parameters
$cellStyleIndex : int

Index to cellXf

removeCellXfByIndex()

Remove cellXf by index. It is ensured that all cells get their xf index updated.

public removeCellXfByIndex(int $cellStyleIndex) : void
Parameters
$cellStyleIndex : int

Index to cellXf

removeDefinedName()

Remove defined name.

public removeDefinedName(string $definedName[, null|Worksheet $worksheet = null ]) : $this
Parameters
$definedName : string
$worksheet : null|Worksheet = null

scope: use null for global scope

Return values
$this

removeNamedFormula()

Remove named formula.

public removeNamedFormula(string $namedFormula[, null|Worksheet $worksheet = null ]) : $this
Parameters
$namedFormula : string
$worksheet : null|Worksheet = null

scope: use null for global scope

Return values
$this

removeNamedRange()

Remove named range.

public removeNamedRange(string $namedRange[, null|Worksheet $worksheet = null ]) : $this
Parameters
$namedRange : string
$worksheet : null|Worksheet = null

scope: use null for global scope

Return values
$this

removeSheetByIndex()

Remove sheet by index.

public removeSheetByIndex(int $sheetIndex) : void
Parameters
$sheetIndex : int

Index position of the worksheet to remove

setActiveSheetIndex()

Set active sheet index.

public setActiveSheetIndex(int $worksheetIndex) : Worksheet
Parameters
$worksheetIndex : int

Active sheet index

Return values
Worksheet

setActiveSheetIndexByName()

Set active sheet index by name.

public setActiveSheetIndexByName(string $worksheetName) : Worksheet
Parameters
$worksheetName : string

Sheet title

Return values
Worksheet

setAutoFilterDateGrouping()

Set whether to group dates when presenting the user with filtering optiomd in the user interface.

public setAutoFilterDateGrouping(bool $autoFilterDateGrouping) : void
Parameters
$autoFilterDateGrouping : bool

true if workbook window is minimized

setFirstSheetIndex()

Set the first sheet in the book view.

public setFirstSheetIndex(int $firstSheetIndex) : void
Parameters
$firstSheetIndex : int

First sheet in book view

setHasMacros()

Define if a workbook has macros.

public setHasMacros(bool $hasMacros) : void
Parameters
$hasMacros : bool

true|false

setIndexByName()

Set index for sheet by sheet name.

public setIndexByName(string $worksheetName, int $newIndexPosition) : int
Parameters
$worksheetName : string

Sheet name to modify index for

$newIndexPosition : int

New index for the sheet

Return values
int

New sheet index

setMacrosCertificate()

Set the macros certificate.

public setMacrosCertificate(string|null $certificate) : void
Parameters
$certificate : string|null

setMacrosCode()

Set the macros code.

public setMacrosCode(string $macroCode) : void
Parameters
$macroCode : string

string|null

setMinimized()

Set whether the workbook window is minimized.

public setMinimized(bool $minimized) : void
Parameters
$minimized : bool

true if workbook window is minimized

setRibbonBinObjects()

store binaries ribbon objects (pictures).

public setRibbonBinObjects(mixed $binObjectsNames, mixed $binObjectsData) : void
Parameters
$binObjectsNames : mixed
$binObjectsData : mixed

setRibbonXMLData()

set ribbon XML data.

public setRibbonXMLData(mixed $target, mixed $xmlData) : void
Parameters
$target : mixed
$xmlData : mixed

setShowHorizontalScroll()

Set the visibility of the horizonal scroll bar in the application.

public setShowHorizontalScroll(bool $showHorizontalScroll) : void
Parameters
$showHorizontalScroll : bool

True if horizonal scroll bar is visible

setShowSheetTabs()

Set the visibility of the sheet tabs in the application.

public setShowSheetTabs(bool $showSheetTabs) : void
Parameters
$showSheetTabs : bool

True if sheet tabs are visible

setShowVerticalScroll()

Set the visibility of the vertical scroll bar in the application.

public setShowVerticalScroll(bool $showVerticalScroll) : void
Parameters
$showVerticalScroll : bool

True if vertical scroll bar is visible

setTabRatio()

Set the ratio between the workbook tabs bar and the horizontal scroll bar TabRatio is assumed to be out of 1000 of the horizontal window width.

public setTabRatio(int $tabRatio) : void
Parameters
$tabRatio : int

Ratio between the tabs bar and the horizontal scroll bar

setVisibility()

Set the visibility status of the workbook.

public setVisibility(null|string $visibility) : void

Valid values are:

  • 'visible' (self::VISIBILITY_VISIBLE): Workbook window is visible
  • 'hidden' (self::VISIBILITY_HIDDEN): Workbook window is hidden, but can be shown by the user via the user interface
  • 'veryHidden' (self::VISIBILITY_VERY_HIDDEN): Workbook window is hidden and cannot be shown in the user interface.
Parameters
$visibility : null|string

visibility status of the workbook

sheetCodeNameExists()

Check if a sheet with a specified code name already exists.

public sheetCodeNameExists(string $codeName) : bool
Parameters
$codeName : string

Name of the worksheet to check

Return values
bool

sheetNameExists()

Check if a sheet with a specified name already exists.

public sheetNameExists(string $worksheetName) : bool
Parameters
$worksheetName : string

Name of the worksheet to check

Return values
bool

getGlobalDefinedNameByType()

private getGlobalDefinedNameByType(string $name, bool $type) : DefinedName|null
Parameters
$name : string
$type : bool
Return values
DefinedName|null

getLocalDefinedNameByType()

private getLocalDefinedNameByType(string $name, bool $type[, Worksheet|null $worksheet = null ]) : DefinedName|null
Parameters
$name : string
$type : bool
$worksheet : Worksheet|null = null
Return values
DefinedName|null

        
On this page

Search results