removeSheet

removeSheet

PREMIUM TRIAL / ADVANCED

Removes sheets from an Excel document.

Description
public removeSheet (string $source, string $target, array $options)

This method allows to remove sheets by their name or position.

Parameters

source

The path to the source Excel document.

target

The path to the resulting Excel document.

options

The possible keys and values are:

Key Type Description
sheetName array Sheet names to remove.
sheetNumber array Sheet numbers to remove.
Code samples

Example #1

Example #2

Release notes
  • phpdocx 8.5:
    • new method.