-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Unable to identify a reader for this file #2907
Comments
Please share your code, PhpSpreadsheet version, Php version. I have no problem identifying a reader for this file (identify returns Xlsx, reader load succeeds): $infil = 'issue.2907.xlsx';
$oufil = 'issue.2907.3.xlsx';
echo \PhpOffice\PhpSpreadsheet\IOFactory::identify($infil);
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile($infil);
$robj = $reader->load($infil);
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($robj, 'Xlsx');
$writer->save($oufil);
echo "$oufil has been saved\n"; |
No update in 3 months. Unable to duplicate. Closing. |
The bug is reproducible when using PhpSpreadsheet 1.29 in a Drupal 10.0 site. Drupal supports "stream wrapper URIs" (an extended version of PHP streams, with Drupal-specific additions), which may look like 'public://subdir1/public-file.abc', 'private://subdirA/private-file.abc', etc. For a more detailed repro scenario, check https://drupal.stackexchange.com/questions/275922/why-does-phpspreadsheet-fail-to-identify-my-xlsx-file-in-public For better context: It's quite likely the Drupal case must be handled by glue code in a Drupal module. I guess something like
should do it. |
This might eventually be handled by PR #3759. |
Importing excel file is prompting an error “Unable to identify a reader for this file”
strict open xml(.xlsx)
test.xlsx
The text was updated successfully, but these errors were encountered: