moveElement

moveElement

ADVANCED / PREMIUM BASIC

Moves elements in the spreadsheet.

Description
public moveElement (array $referenceNode, array $referenceNodeTo, array $options = array())
Parameters

referenceNode

An array to get the reference node.
The possible keys and values of this array are:

key Type Description
type string
  • sheet
contains string Contains a text string. Sheet type.
occurrence mixed
  • (int) exact occurrence from 1
  • (array) occurrences
  • (string) range of contents (e.g.: 2..9, 2.., ..9), first(), last()
attributes array Contains a specific attribute key and value.
customQuery string Custom XPath query, overwrites any other reference.

referenceNodeTo

An array to get the destination reference node.
The possible keys and values of this array are:

key Type Description
type string
  • sheet
contains string Contains a text string. Sheet type.
occurrence mixed
  • (int) exact occurrence from 1
  • first(), last()
attributes array Contains a specific attribute key and value.
customQuery string Custom XPath query, overwrites any other reference.

location

Key Type Description
location string
  • after (default)
  • before
Exceptions

Method not available.

Code samples

Example #1

Release notes
  • phpxlsx 5.0:
    • new method.