Export to excel of dynamic paging grid

Hello, I’m using dynamic paging in grid with about 50k rows.
I’ve found that following exports only loaded pages

st_grid.toExcel('/dhtmlx/grid-excel-php/generate.php');

How can we export all table, which is represented with dynamic paging?