Hi.
The exported file is fixed "grid.xlsx" in code.
But i want set the name in the javascript before call mygrid.toExcel.
How to do this?
Thanks!
Hi.
The exported file is fixed "grid.xlsx" in code.
But i want set the name in the javascript before call mygrid.toExcel.
How to do this?
Thanks!
Hi,
you should have a look at file gridExcelWrapper.php:
header(‘Content-Disposition: attachment;filename=“grid.xlsx”’);
You may change file name here. You may pass it from client side as parameter in url and do something like here:
$filename = isset($_GET['filename']) ? $_GET['filename'] : 'grid';
header('Content-Disposition: attachment;filename='.$filename.'".xlsx"');
where filename is a parameter in export url:
scheduler.toPDF("…/grid-excel-php/generate.php?filename=somename");
I can do it now.
Thanks!