Forum


Replies: 3   Views: 281
Microsoft excel files of different version do not read files
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by fairshareitservices  · 10-04-2024 - 08:25

Hello,

We are reading excel files created Excel 2016 version and it is working perfectly. But now we are using Excel 2019 version and file stop reading. It shows error like PHP Warning:  Trying to access array offset on the value of type null in D:\laravel\xxxxx\xxxxx\xxxxxx.php on line 691.  Reading file and passing array Null. 

Does the library support Excel 2019?

Sample code of reading excel - Working fine for excel 2016 but not excel 2019 files

$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();

//Get Mapping table columns and row index of scheme code
    $mappingSpreadsheet = $reader->load("$INPUT_DIRECTORY/$mappingFileName");

    $mappingSpreadsheetData=$mappingSpreadsheet->getActiveSheet()->toArray();