Class "PhpOffice\PhpSpreadsheet\IOFactory" not found

Created on 16 August 2023, 11 months ago
Updated 17 August 2023, 11 months ago

Problem/Motivation

No phpOfiice support?

Steps to reproduce

Drupal 10.1.2,Module:
Feeds ON
Feeds logs ON
Feeds xlsx ON
crete new feeds,mapping/inport node to basic page.
ID title body

When save&import uploaded xlsx,shows:mysite.com/batch?id=34&op=start ---->The progress bar does not move.

I check mysite.com/admin/reports/dblog/event/250 shows:

Place http://mysite.com/batch?_format=json&id=34&op=do
from http://mysite.com/batch?id=34&op=start
Error:Drupal\feeds_xlsx\Feeds\Parser\XlsxParser->parse() in Class "PhpOffice\PhpSpreadsheet\IOFactory" not found (/www/wwwroot/mysite.com/Drupal10/modules/feeds_xlsx/src/Feeds/Parser/XlsxParser.php line 52)

So I try to download https://github.com/PHPOffice/PhpSpreadsheet/archive/refs/heads/master.zip --->unzip it to /www/wwwroot/mysite.com/Drupal10/libraries/PhpSpreadsheet ,same error still exists.

Question:How to use/config Feeds XSLX in Drupal 10?Thanks.

💬 Support request
Status

Needs review

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ty10086
  • 🇮🇳India shailja179 India

    @ty10086,
    I ran the composer require phpoffice/phpspreadsheet in my project root and it started working.
    For now you can run this command to make it work.

    It should be in modules composer file. I am adding patch to modules composer file. Once it will be in new release, it will work on module download with composer.

  • Status changed to Needs review 11 months ago
  • 🇮🇳India shailja179 India
  • @shailja179 Thanks Bro.
    I tried
    composer require phpoffice/phpspreadsheet in Drupal root file;
    composer require phpoffice/phpspreadsheet -W;
    composer require phpoffice/phpspreadsheet:^1.28 -W (in composer.json is 1.29)
    some errors as attchaments show,with new problem.
    problem 2/3/4:Drupal needs running php 8.1.7(8.x)
    prolem 1?
    problem 5?
    I checked mysites/admin/reports/status is ok.

  • @shailja179
    I try to downgrade to version 10.1.12---->10.1.0-alpha1 by composer composer update "drupal/core-*" --with-all-dependencies,and root composer.json "minimum-stability": "stable",----->"minimum-stability": "dev"----> composer require phpoffice/phpspreadsheet ----->Using version ^1.28 for phpoffice/phpspreadsheet
    in feeds_xslx/composer.json keeping :"phpoffice/phpspreadsheet": "^1.29",

    It is worked for me.

    10.1.12 not worked well.

  • 🇮🇳India shailja179 India

    I am using Drupal 10.1.x and Php 8.1. Its working for me.
    See the screenshots.

  • @shailja179
    Finally, I root+composer config -g --unset repos.packagist --->composer require phpoffice/phpspreadsheet:1.29.0 -W

    This is work for me on Drupal 10.1.2+php 8.1.7.

Production build 0.69.0 2024