Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

Decoupling PHPExcel and Writers #402

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

frost-nzcr4
Copy link
Contributor

This update relates to the problem when you have set of PHPExcel objects and try to write all of them by using the writer, which has been configured once per set. To do this with current codebase one should instantiate the writer for each PHPExcel in the set, except Excel2007 and OpenDocument writers there get/setPHPExcel methods already in use. After this update you can use it with other writers as well.

So with update you can do this:

$lonely_writer = new Writer($phpExcel1);
$lonely_writer->save();
$lonely_writer->setPHPExcel($phpExcel2)->save();

instead of this:

$writer1 = new Writer($phpExcel1);
$writer1->save();
$writer2 = new Writer($phpExcel2);
$writer2->save();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants