ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 18.221.194.67 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/ |
Upload File : |
# 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 '<h3>Worksheet Names</h3>'; echo '<ol>'; foreach ($worksheetNames as $worksheetName) { echo '<li>', $worksheetName, '</li>'; } echo '</ol>'; ``` > 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 '<h3>Worksheet Information</h3>'; echo '<ol>'; foreach ($worksheetData as $worksheet) { echo '<li>', $worksheet['worksheetName'], '<br />'; echo 'Rows: ', $worksheet['totalRows'], ' Columns: ', $worksheet['totalColumns'], '<br />'; echo 'Cell Range: A1:', $worksheet['lastColumnLetter'], $worksheet['totalRows']; echo '</li>'; } echo '</ol>'; ``` > See Examples/Reader/exampleReader19.php for a working example of this code.