# PHPExcel User Documentation – Reading Spreadsheet Files ## Helper Methods You can retrieve a list of worksheet names contained in a file without loading the whole file by using the Reader’s `listWorksheetNames()` method; similarly, a `listWorksheetInfo()` method will retrieve the dimensions of worksheet in a file without needing to load and parse the whole file. ### listWorksheetNames The `listWorksheetNames()` method returns a simple array listing each worksheet name within the workbook: ```php $objReader = PHPExcel_IOFactory::createReader($inputFileType); $worksheetNames = $objReader->listWorksheetNames($inputFileName); echo '

Worksheet Names

'; echo '
    '; foreach ($worksheetNames as $worksheetName) { echo '
  1. ', $worksheetName, '
  2. '; } echo '
'; ``` > See Examples/Reader/exampleReader18.php for a working example of this code. ### listWorksheetInfo The `listWorksheetInfo()` method returns a nested array, with each entry listing the name and dimensions for a worksheet: ```php $objReader = PHPExcel_IOFactory::createReader($inputFileType); $worksheetData = $objReader->listWorksheetInfo($inputFileName); echo '

Worksheet Information

'; echo '
    '; foreach ($worksheetData as $worksheet) { echo '
  1. ', $worksheet['worksheetName'], '
    '; echo 'Rows: ', $worksheet['totalRows'], ' Columns: ', $worksheet['totalColumns'], '
    '; echo 'Cell Range: A1:', $worksheet['lastColumnLetter'], $worksheet['totalRows']; echo '
  2. '; } echo '
'; ``` > See Examples/Reader/exampleReader19.php for a working example of this code.