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

Export multiple sheets #29

Closed
rap2hpoutre opened this issue Jun 6, 2018 · 1 comment
Closed

Export multiple sheets #29

rap2hpoutre opened this issue Jun 6, 2018 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rap2hpoutre
Copy link
Owner

rap2hpoutre commented Jun 6, 2018

It could be something like:

use Rap2hpoutre\FastExcel\FastExcel;
use Rap2hpoutre\FastExcel\SheetCollection;
use App\User;
use App\Project;

$users = User::all();
$projects = Project::all();

$sheets= new SheetCollection($users, $projects)

// Export all users in sheet 1 and all projects on sheet 2
(new FastExcel($sheets))->export('file.xlsx');

So in other words we could:

  • Create a new class SheetCollection (which extends Collection)
  • Accept SheetCollection in FastExcel contructor.
  • If the paramter is a SheetCollection, then it means each item must be in a sheet.

It seems a simple API.

@rap2hpoutre
Copy link
Owner Author

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant