Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'PhpOffice\PhpSpreadsheet\IOFactory' not found #20

Open
cleicht opened this issue Apr 21, 2022 · 17 comments
Open

Class 'PhpOffice\PhpSpreadsheet\IOFactory' not found #20

cleicht opened this issue Apr 21, 2022 · 17 comments
Labels
bug Something isn't working

Comments

@cleicht
Copy link

cleicht commented Apr 21, 2022

Hello, i try to use xls import and get this error. Is it possible to load phpOffice to the extension?

@foppelfb
Copy link
Member

What error?

@foppelfb
Copy link
Member

ah ok, in the title.
How did you install the extension? composer or TER download?

@cleicht
Copy link
Author

cleicht commented Apr 21, 2022

With TER. I have fix it by installing base_excel.

@foppelfb
Copy link
Member

I just tested with a fresh manual install of a Typo3 10.4.27 and the Extension pulled directly from the Extensionmanager from the TER, version 2.0.8 with no additional extensions besides adding tt_address, and it worked for me out of the box, i.e. I can not reproduce the Error.
Can you give me more Information about your setup? PHP/TYPO3/Extension Version?

@onlineware
Copy link

I have the same error! Typo3 11.5.13 and xslimporter Version 3.0.0. I have installed the extension via TER.
I could install and configure the extension, but when i import an csv or xls file this error occured.
Class 'PhpOffice\PhpSpreadsheet\IOFactory' not found
I clicked the Dump autoload in the admin tools, but unfortunately no improvement.
Can you help me?

@slowhand11
Copy link

I have the same error. Typo3 11.5.10

@simtecsoft
Copy link

simtecsoft commented Feb 1, 2023

Same Error, Typo 11.5.16, XLS Importer 3.0.0, tried with tt_content and tt_address

@calien666 calien666 added the bug Something isn't working label Feb 11, 2023
@calien666
Copy link
Member

@cleicht @slowhand11 @simtecsoft

After there are issues with the automatic release to TER, I uploaded a refactored version, compatible with TYPO3 v11, as attachment on the latest release:

https://github.com/sudhaus7/typo3-xlsimport/releases/tag/4.0.0
https://github.com/sudhaus7/typo3-xlsimport/releases/download/4.0.0/xlsimport_4.0.0.zip

I tested with a local, non-composer-installed TYPO3 v11.5.23 and had no issues with the autoloading. Upload, Import worked as expected. I hope, you feel pretty with the new version.

@BastianBalthasarBux
Copy link
Contributor

With TER. I have fix it by installing base_excel.

Same bug, same solution.
Maybe add base_excel extension https://extensions.typo3.org/extension/base_excel as a dependency in composer.json and ext_emconf.php

@calien666
Copy link
Member

@BastianBalthasarBux Are you sure, the error was there with version 4?
Adding the dependency in conposer.json doesn't make sense, as composer based installations will ship the real PhpSpreadsheet library already. Adding a TYPO3 extension just to add the dependency will make a lot of boilerplate, we don't need.
AFAIK we changed the automatic generation of the TER-Version to ship the PHpSpreadsheet as vendor dependency with autoload via ext_emconf, mostly this is all we need. If this is causing problems, we will take a look

@foppelfb
Copy link
Member

@BastianBalthasarBux please check 4.0.3 from TER if that works for you

@BastianBalthasarBux
Copy link
Contributor

BastianBalthasarBux commented Jan 22, 2024

@BastianBalthasarBux Are you sure, the error was there with version 4? Adding the dependency in conposer.json doesn't make sense, as composer based installations will ship the real PhpSpreadsheet library already. Adding a TYPO3 extension just to add the dependency will make a lot of boilerplate, we don't need. AFAIK we changed the automatic generation of the TER-Version to ship the PHpSpreadsheet as vendor dependency with autoload via ext_emconf, mostly this is all we need. If this is causing problems, we will take a look

It was a TYPO3 v11.5.33 with "classic" installation. Installed extension via EM from TER.
Installed version of EXT:xlsimport was a 4.0.1

I see, for composer based installation, the dependency then will make no sense.
But for TER based installations there seem two ways: ship phpoffice with the extension (as it is not part of the core, at least in v11 LTS), or add dependency to the forementioned extension. Not sure, what is better and easier.

@calien666
Copy link
Member

I debugged and now have a working solution shipping the needed packages within without struggling in composer installs. Check out version 5 and enjoy

@mminyades
Copy link

I received this error message while using XLSImport 5.0.5 on TYPO3 12.4.11 (EM/TER) - I do not use Composer.

After installing base_excel, the import was possible.
After the import, another error message appeared, which I can't remember now - but the import seems to have worked so far.

@stekna
Copy link

stekna commented Mar 29, 2024

I get the same error.
TYPO3 12.4.13, xlsimport 5.0.5.
Extension base_excel solved this.

@webdev2027
Copy link

Hello, I use TYPO3 v11.5.37 with PHP 8.1 - classic installation without composer (unfortunately windows server).
Install Extension xlsimport 5.0.5, insert the tsconfig snippet (see doc.). Try to import an csv sheet and get Class 'PhpOffice\PhpSpreadsheet\IOFactory' not found

After reading this Issue, install base_excel and install the latest version 1.29.0
Error: Composer detected issues in your platform: Your Composer dependencies require a 64-bit build of PHP. oops!
Re-Install base_excel ans install version 0.3.0 and xlsimport works ...

Not the perfect way, but it works.
(Try to import 15.000 addresses failed. timeout?)

@calien666
Copy link
Member

Hi @webdev2027
Thank you for your comment. Did your import of the addresses request in a server timeout from your webserver? If your php is not running as webserver module but separately instanciated, your import should finish. Otherwise import crashes, as the timeout is running in.
This problem is known, but currently we don't have a simple solution for this.

The problem with the composer is new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants