Open thiagoreri opened 5 years ago
@thiagoreri
It is possible to dump the table into a spreadsheet file using your custom finder.
$table = TableRegistry::get('SomeTable');
$manager = new Manager();
$file = new File('your/file.xlsx');
$spreadsheet = $manager->getSpreadsheet($file);
$worksheet = $spreadsheet->getActiveSheet();
$manager->write($table, $worksheet, [
'finder' => 'myFinder',
'finderOptions' => [], //pass options to your finder
]);
$writer = $manager->save($spreadsheet, $file);
Check this method for reference: https://github.com/robotusers/cakephp-excel/blob/master/src/Excel/Manager.php#L154
IS possible export for empty file?
When trying to do this happens the following error:
Invalid cell cordinate
Is there a possibility, of doing the process to the contrary, make a find in the table and write in the file? In the case it would be a data export