SOFTELメモ Developer's blog

PHPExcelで xlsxファイルが開けない

2019/01/31 php

問題

PHPExcelでExcelのファイルを開こうとしていますが、以下のエラーで開けないです。

PHP Warning:  ZipArchive::getFromName(): Invalid or uninitialized Zip object in /xxx/yyy/zzz
PHP Fatal error:  Uncaught exception 'PHPExcel_Exception' with message 'Your requested sheet index: -1 is out of bounds. The actual number of sheets is 0.' in /xxx/yyy/zzz

答え

Excelにパスワード保護が設定してあるとそうなりました。

関連するメモ

コメント