mergeCells

mergeCells

ADVANCED / PREMIUM BASIC

Merges cells in the spreadsheet.

Description
public mergeCells ($position, array $options = array())
Parameters

position

Cell range to be merged: A2:D2, C2:E4...

options

key Type Description
emptyExtraMergedCells bool Empty merged cell contents from upper-left value. Default as true.
Exceptions

Method not available.

Code samples

Example #1

The resulting XLSX looks like:

Release notes
  • phpxlsx 5.0:
    • new method.