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

createWriter($showPHPExcel, "Xlsx"); save(file) 2 times crash #3209

Closed
alaindev opened this issue Nov 25, 2022 Discussed in #2770 · 4 comments
Closed

createWriter($showPHPExcel, "Xlsx"); save(file) 2 times crash #3209

alaindev opened this issue Nov 25, 2022 Discussed in #2770 · 4 comments

Comments

@alaindev
Copy link

Discussed in #2770

Originally posted by alaindev April 23, 2022
Hello PhpSpreadsheet Team

I Face a Bug when i need to reopen a phpspreadsheet created template.

crash when save if images where in the footer

IOFactory::load eval-crash.xlsx whith image in footer
create a IOFactory::createWriter and save it to file2.xlsx

IOFactory::load(file2.xlsx) produced by phpspreasheet
create a IOFactory::createWriter and save it to dest.xlsx

and crash bescause of missing zip image stuff ?

Fatal error: Uncaught PhpOffice\PhpSpreadsheet\Writer\Exception: File zip://C:\temp\file2.xlsx# does not exist in C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\aplitec\includes\modules\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Writer\Xlsx\ContentTypes.php on line 215

=========================================

getSheetNames(); $liassewriter = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($showPHPExcel,"Xlsx"); $file = 'c:\tmp\file1.xlsx'; $liassewriter->save($file); $step2PHPExcel = \PhpOffice\PhpSpreadsheet\IOFactory::load($file); $sheets_array = $showPHPExcel->getSheetNames(); $liassewriter = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($step2PHPExcel, "Xlsx"); $liassewriter->save('c:\tmp\file2.xlsx'); ?>

================================================
Thanks a lot Regards
Alain

[eval-crash.xlsx](https://github.com/PHPOffice/PhpSpreadsheet/files/10089647/eval-crash.xlsx)
@oleibman
Copy link
Collaborator

This seems similar to issue #3126, which was fixed (I hope) by PR #3140, which was merged around Nov. 2. Does your error still occur when you test against master?

@alaindev
Copy link
Author

Sorry i did not test dev version.
I confirm it is fixed.
I must wait for official release distributed by composer.
Thx @oleibman

@alaindev
Copy link
Author

@ALL
I cannot understand why composer update keep phpspreadsheet stuck to 1.16 version and do not update to 1.25

@oleibman
Copy link
Collaborator

Closing. PhpSpreadsheet problem is solved. If there is a problem with Composer, it is unrelated and should be opened as a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants