Install Library Phpspreadsheet via Composoer Autoload not working? |
I just installed Phpoffice/Phpspreadsheet via Composer but I can't create new instance of this library. I've checked in the composer.json file, there is already a phpspreadsheet in require.
But when I try to create a new instance, There's an error "Undefined type 'PhpOffice\PhpSpreadsheet\Reader\Xlsx'". Please help me to find out what's wrong.
Can you show how you used it on your code? Maybe you are missing the use statement?
(09-25-2020, 09:12 AM)paulbalandan Wrote: Can you show how you used it on your code? Maybe you are missing the use statement? Code: public function readerXlsx() I follow the same way as in the documentation to create instances to write a phpspreadsheet.
@mrardiyansyah,
I have been using a plain PHP application and PHP Spreadsheet for quite a few years. I have PhpSpreadsheet installed in /var/www/ci2/vendor and use the following script to create a new instance: PHP Code: require '/var/www/ci2/vendor/autoload.php'; |
Welcome Guest, Not a member yet? Register Sign In |