addCellRange

addCellRange

BASIC / ADVANCED / PREMIUM

Adds ranges of cell contents into the Excel spreadsheet.

Description
public addCellRange($contents, $position, $cellStyles = array(), $options = array())

This method allows adding a range of cell contents from a position.

Parameters

contents

A multidimensional array with the contents and styles to be added. Check addCell to see all available options.

position

Cell position in the active sheet: A1, C3, AB7...

cellStyles

Check addCell to see all available options.

options

Check addCell to see all available options.

Return values

Array with the cell positions added by the method.

Code samples

Example #1

The resulting XLSX looks like:

Example #2

The resulting XLSX looks like:

Example #3

The resulting XLSX looks like:

Release notes
  • phpxlsx 1.0:
    • new method.