PHP code example of laacz / xls-parser

1. Go to this page and download the library: Download laacz/xls-parser 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/ */

    

laacz / xls-parser example snippets


$book = new laacz\XLSParser\Book(file_get_contents('workbook.xls'));

$sheet = $book[0];
$sheet = $book['Page1'];
$sheet = $book['Vājprāts'];

$row = $sheet[0];
$cell = $sheet[$sheet->nrows - 1][1];

$val1 = $cell->value;
$val2 = (string)$cell;

$val1 = $book[0][0][0]->value;