Export excel data

Hello, I have a problem when exporting the data in Excel I only get 1000 records
image

Hello @Pedro ,

Yes, this is a limitation that we have hardcoded since we saw that after 1000 records the memory usage of the PHP application is getting full. In order to change that you can use the replaceState | Grocery CRUD v3 function and replace the functionality you don’t like. For example in your case you can create a custom export state that will look like this:

<?php
use GroceryCrud\Core\State\ExportState;
use GroceryCrud\Core\State\StateInterface;

class CustomExportState extends ExportState implements StateInterface {

    public function getPerPage($data = []) {
        return 20000;
    }
}

And you can add it like this:

$exportState = new CustomExportState($crud);
$crud->replaceState('Export', $exportState);

Let me know if that worked for you.

Regards
Johnny

If you see that you have problems with 20000 I have a full example at the replaceState documentation which you can export those files with another library.

Thank you very much for your response, I will make the changes and let you know.