PHP code example of yordanny90 / bigxlsx

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

    

yordanny90 / bigxlsx example snippets




 = 'ruta-del-archivo.xlsx';
$xlsx = new \BigXLSX\Reader($file);

// Lista de hojas con su rId y nombre.
$sheets = $xlsx->getSheetrIdNames();

// Obtiene la primera hoja visible del archivo Excel.
// El rId de la primera hoja no siempre es el mismo.
$firstSheet = reset($sheets);
$sheet = $xlsx->getSheetByrId($firstSheet['id']);

foreach ($sheet as $row) {
    // Usar cada fila de la hoja.
}