I have an 8 linearly related tables. Then a final table is consist ~60 columns and ~24000 rows and I need to export all data into excel file(XLSX format). I decided to use Spout PHP library to export and import files instead of PHPexcel library, because exported data is too big. I configured my project as it is described in documentation to work with this library. Also I added this code into a view file.
$multipleRows = [
'columns' => ['id',
'sub_id',
'address_id',
'abc',
'bca',
'cab',
'bac',
... //and so on
]
];
$writer = WriterFactory::create(Type::XLSX);
$writer -> openToFile('c:/www/localhost/project/web/uploads/test.xlsx');
$writer -> addRows($multipleRows);
$writer -> close();
But when I am trying to export XLSX file, I got column headers in the first row of Output file. What should I do to get an exported file looks like a gridview?