0

I am introducing myself to the world of Laravel and a Maatwebsite Laravel Excel library, but I cannot find in its documentation to export multiple sheets or anywhere, how to export several different tables from a database in a single Excel workbook. Anyone who has suggestions or has achieved this with the Maatwebsite library?

This is my Export file:


namespace App\Exports;

use App\Models\tablasexcel;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromCollection;


class tablasexcelexport implements 
 FromCollection 

{

     public function collection()
    {
        
        return collect(tablasexcel::getFinanciero());
    }  

    public function collection()
    {
        
        return collect(tablasexcel::getNegocios());
    }  
   
} ```

I am using Laravel 8 and Laravel Excel 3.1
2
  • Have you tried this multi-sheet export feature ? docs.laravel-excel.com/3.0/exports/multiple-sheets.html Commented Jun 18, 2021 at 3:22
  • Hello, if I check it but it only does it with one table, I need it to do it with more than one table in the database and not filter by dates. Commented Jun 18, 2021 at 15:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.