Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
free up memory on phpExcel
$objPHPExcel->disconnectWorksheets();
unset($objPHPExcel);
@IulianDide

This comment has been minimized.

Copy link

IulianDide commented Jan 19, 2017

You saved my life :)
Thanks

@phuongcv1112

This comment has been minimized.

Copy link

phuongcv1112 commented Jan 18, 2018

$objPHPExcel->disconnectWorksheets();
$objPHPExcel->garbageCollect();
unset($objPHPExcel);

Add garbageCollect() will resolve all issue of OOM

@martinKindall

This comment has been minimized.

Copy link

martinKindall commented Jul 25, 2018

Thanks, worked for me using PhpSpreadsheet.

@look416

This comment has been minimized.

Copy link

look416 commented Aug 20, 2018

Thanks, it worked for me so well.

@stefanhuber

This comment has been minimized.

Copy link

stefanhuber commented Mar 6, 2019

Great! This worked for php spreadsheet as well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.