addLink

addLink

BASIC / ADVANCED / PREMIUM

Adds links into the Excel spreadsheet.

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

This method allows adding a link into a position.

Parameters

link

URL or #location.

position

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

contents

Check addCell to see all available options.

cellStyles

Check addCell to see all available options.

options

Check addCell to see all available options.

Code samples

Example #1

The resulting XLSX looks like:

Example #2

The resulting XLSX looks like:

Release notes
  • phpxlsx 1.0:
    • new method.