Practical phpxlsx

Get information


phpxlsx provides methods to get information from cell positions and XLSX files. These methods can be used combined with other methods of phpxlsx to generate flexible tasks based on the existing contents in a spreadsheet.

Cell information

The getCell method returns an array with cell content information such as its type and value:

The following sample illustrates how to run this method:

The getCellPositions method returns all cell positions that include contents.


Indexer parses the contents of an XLSX file and returns an array with information such as sheet names, properties, comments, links, images, table names and many other useful details about the spreadsheet.

The following sample code calls Indexer to get information from an XLSX file:

Tips and tricks

The getCell method returns null if the cell position doesn't exist in the sheet.

Next - Format transformations