Skip to content

Instantly share code, notes, and snippets.

@fazlurr
Created September 30, 2022 07:23
Show Gist options
  • Save fazlurr/1ea03a4a53f06543c69f41d06e174905 to your computer and use it in GitHub Desktop.
Save fazlurr/1ea03a4a53f06543c69f41d06e174905 to your computer and use it in GitHub Desktop.
Read Excel in PHP
<?php
use Shuchkin\SimpleXLSX;
...
$file = $request->file('file');
$file_path = $file->getRealPath();
if ( $xlsx = SimpleXLSX::parse($file_path) ) {
$rows = $xlsx->rows();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment