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.

Revisions

  1. fazlurr created this gist Sep 30, 2022.
    11 changes: 11 additions & 0 deletions read-excel.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    <?php
    use Shuchkin\SimpleXLSX;

    ...

    $file = $request->file('file');
    $file_path = $file->getRealPath();

    if ( $xlsx = SimpleXLSX::parse($file_path) ) {
    $rows = $xlsx->rows();
    }