How to get sheet names or load first sheet

Topics: Developer Forum
Jul 14, 2011 at 4:37 PM

Using the:

$objReader = PHPExcel_IOFactory::createReader('Excel2007');

$objReader->setLoadSheetsOnly('Schedule xyz');

I can load my worksheet "Schedule xyz" without any problem.

Is there an easy way to load just the FIRST worksheet in a file without knowing its name or get just the names of existing worksheets without loading the entire file into memory?

Jul 14, 2011 at 4:59 PM

$sheets = $objReader->listWorksheetNames($file);