Jump to content

phives

New Members
  • Posts

    5
  • Joined

  • Last visited

phives's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I admit I am lost. I run composer then what? This is what my folder structure looks like on the server. Will composer create the new folders or do I have to do that. Can you give me a quick order of actions please.
  2. Do I have to first copy all the PhpSpreadsheet files onto the server and then run composer?
  3. I installed all the extensions. I then ran the composer. Per composer instructions it was supposed to create a vendor.autoload.php. Alas it did not.
  4. Where do I find the autoload file? Here is error message ubuntu@ip-172-31-91-195:~$ composer require phpoffice/phpspreadsheet Installation failed, deleting ./composer.json. In RequireCommand.php line 210: No composer.json present in the current directory (./composer.json), this may be the cause of the following exception. In InitCommand.php line 904: Package phpoffice/phpspreadsheet has requirements incompatible with your PHP version, PHP extensions and Composer version: - phpoffice/phpspreadsheet 1.29.0 requires ext-dom * but it is not present. - phpoffice/phpspreadsheet 1.29.0 requires ext-simplexml * but it is not present. - phpoffice/phpspreadsheet 1.29.0 requires ext-xml * but it is not present. - phpoffice/phpspreadsheet 1.29.0 requires ext-xmlreader * but it is not present. - phpoffice/phpspreadsheet 1.29.0 requires ext-xmlwriter * but it is not present. - phpoffice/phpspreadsheet 1.29.0 requires ext-zip * but it is not present. require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
  5. I am using open source PDF and Excel software. All run perfectly in previous versions of PHP. However, when moving code to 8.1 the following error is reported. In this case it happens to be with PhpSpreadsheet. But it also happens with other packages. Appears to find the file correctly but then has issues. I've been using PHP for a while, but I'm not really familiar with the inner workings. Uncaught Error: Class "var\\www\\html\\STG\\PhpOffice\\PhpSpreadsheet\\Spreadsheet" not found Here is the code I am using: use \var\www\html\STG\PhpOffice\PhpSpreadsheet\Spreadsheet; use \var\www\html\STG\PhpOffice\PhpSpreadsheet\Writer\Xlsx; $spreadsheet = new Spreadsheet(); $activeWorksheet = $spreadsheet->getActiveSheet(); $activeWorksheet->setCellValue('A1', 'Hello World !'); $writer = new Xlsx($spreadsheet); $writer->save('hello world.xlsx');
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.