saveXlsx

saveXlsx

BASIC / ADVANCED / PREMIUM

Generates the Excel spreadsheet.

Description
public saveXlsx($fileName = 'book', $options = array())
Parameters

fileName

File name and path of the new XLSX file. The default name is book.xlsx .

options

The possible keys and values of this array are:

Key Type Description
removeCalcChain bool if true, remove calcChain file from the XLSX. MS Excel regenerates it automatically. Default as false.
Return values

XlsxStructure

Exceptions

The license is not valid.

The XLSX can't be saved.

Code samples

Example #1

The resulting XLSX looks like:

Release notes
  • phpxlsx 4.0:
    • removeCalcChain option.
  • phpxlsx 1.0:
    • new method.