PHP code example of jackmartin / readerexcel

1. Go to this page and download the library: Download jackmartin/readerexcel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jackmartin / readerexcel example snippets



php reader.php test.xlsx



use ReaderExcel\SpreadsheetReader;

$file = __DIR__ . '/test.xlsx';

$reader = new SpreadsheetReader($file);

$Sheets = $reader->Sheets();

foreach ($Sheets as $Index => $Name) {

    $reader->ChangeSheet($Index);

    foreach ($reader as $Key => $Row) {

        print_r($Row);

    }

}