There is a light library SimpleXLSX . Basic use, in the $sheetData variable you get an array from the table:
$fileImport = get_stylesheet_directory() . '/data/example.xlsx';
if ( $xlsx = SimpleXLSX::parse( $fileImport )) {
$sheetData = $xlsx->rows(1);
foreach ( $sheetData as $key => $sheetRow ) {
var_dump( $sheetRow );
}
} else {
var_dump( SimpleXLSX::parse_error() );
}
Another example here Used to use the old library PHPExcel , converts excel to and from an array, but it has been unsupported for a long time and is prone to errors on the latest versions of php