Documentation

PivotTable
in package
implements Stringable

Read-only representation of a pivot table.

This models the metadata of a pivot table that already exists in a loaded spreadsheet: its name, where it is placed on the sheet, the cache it draws its data from, and the fields on each axis. It does not (yet) recalculate or render the pivot, and it does not modify the underlying file - existing pivot tables are still written back verbatim from the preserved source XML.

Tags
see
PivotCacheDefinition
see
PivotField

Table of Contents

Interfaces

Stringable

Methods

__construct()  : mixed
__destruct()  : mixed
Code to execute when this pivot table is unset().
__toString()  : string
addField()  : self
getCacheDefinition()  : PivotCacheDefinition|null
getColumnFields()  : array<string|int, PivotField>
Return only the fields placed on the column axis, in order.
getDataFields()  : array<string|int, PivotField>
Return only the value/data fields, in order.
getFields()  : array<string|int, PivotField>
getLocation()  : string
getName()  : string
getPageFields()  : array<string|int, PivotField>
Return only the fields placed on the page/filter axis, in order.
getRowFields()  : array<string|int, PivotField>
Return only the fields placed on the row axis, in order.
getWorksheet()  : Worksheet|null
isGenerated()  : bool
setCacheDefinition()  : self
setGenerated()  : self
setLocation()  : self
setName()  : self
setWorksheet()  : self

Methods

__construct()

public __construct([string $name = '' ]) : mixed
Parameters
$name : string = ''

__destruct()

Code to execute when this pivot table is unset().

public __destruct() : mixed

__toString()

public __toString() : string
Return values
string

getColumnFields()

Return only the fields placed on the column axis, in order.

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

getDataFields()

Return only the value/data fields, in order.

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

getLocation()

public getLocation() : string
Return values
string

getName()

public getName() : string
Return values
string

getPageFields()

Return only the fields placed on the page/filter axis, in order.

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

getRowFields()

Return only the fields placed on the row axis, in order.

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

isGenerated()

public isGenerated() : bool
Return values
bool

setGenerated()

public setGenerated(bool $generated) : self
Parameters
$generated : bool
Return values
self

setLocation()

public setLocation(string $location) : self
Parameters
$location : string
Return values
self

setName()

public setName(string $name) : self
Parameters
$name : string
Return values
self

        
On this page

Search results