You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it means a new property (names) could be added to SheetCollection then it could be passed as a second argument in the SheetCollection constructor.
The main advantage to add it in the constructor is that (in a second step), it could be used in import process too: the sheet names would be loaded from the importSheets function that returns the SheetCollection. So that's cool.
One disadvantage of creating the name of the sheets via SheetCollection constructor is that there is no way to name a sheet when exporting only a Collection (e.g only one sheet) but I'm not sure it's an actual issue: the main goal is to name sheets in multiple sheets export.
The text was updated successfully, but these errors were encountered:
'users sheet' => User::all(),
'project sheet' => Project::all()
]);``` and still supporting `$sheets = new SheetCollection([User::all(), Project::all()]);` if you don't want to change sheet names?
When exporting a single collection, you would use `$sheets = new SheetCollection(['users' => User::all()]);`
According to this comment, it would be great to be able to name sheets. As suggested by @harty, it could be done in
SheetCollection
constructor:So it means a new property (
names
) could be added toSheetCollection
then it could be passed as a second argument in theSheetCollection
constructor.The main advantage to add it in the constructor is that (in a second step), it could be used in import process too: the sheet names would be loaded from the
importSheets
function that returns theSheetCollection
. So that's cool.One disadvantage of creating the name of the sheets via
SheetCollection
constructor is that there is no way to name a sheet when exporting only aCollection
(e.g only one sheet) but I'm not sure it's an actual issue: the main goal is to name sheets in multiple sheets export.The text was updated successfully, but these errors were encountered: