update 1.0.8.0
Commits for version update
This commit is contained in:
35
vendor/maatwebsite/excel/docs/export/simple.md
vendored
Normal file
35
vendor/maatwebsite/excel/docs/export/simple.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# Simple Excel Export
|
||||
|
||||
### Basics
|
||||
|
||||
A new file can be created using the `create` method with the filename as first parameter.
|
||||
|
||||
Excel::create('Filename');
|
||||
|
||||
To manipulate the creation of the file you can use the callback
|
||||
|
||||
Excel::create('Filename', function($excel) {
|
||||
|
||||
// Call writer methods here
|
||||
|
||||
});
|
||||
|
||||
### Changing properties
|
||||
|
||||
There are a couple of properties we can change inside the closure. Most of them are set to the config values by default. See `app/config/packages/maatwebsite/excel/config.php`.
|
||||
|
||||
Excel::create('Filename', function($excel) {
|
||||
|
||||
// Set the title
|
||||
$excel->setTitle('Our new awesome title');
|
||||
|
||||
// Chain the setters
|
||||
$excel->setCreator('Maatwebsite')
|
||||
->setCompany('Maatwebsite');
|
||||
|
||||
// Call them separately
|
||||
$excel->setDescription('A demonstration to change the file properties');
|
||||
|
||||
});
|
||||
|
||||
> Go to the reference guide to see a list of available properties.
|
||||
Reference in New Issue
Block a user