I want to change a data in a cell on export excel. But the event does not appear to occur. My php version is 5.3.3. The export take the filename only. It's my php version? thank!
$grid["export"] = array("format"=>"xls", "filename"=>"my-file", "heading"=>"Export to Excel Test", "range" => "filtered");
$e["on_render_excel"] = array("custom_export", null, false);
// custom on_export callback function
$objPHPExcel = $param["phpexcel"];
$arr = $param["data"];
// column formatting using phpexcel
$cell = $r+1;
$data = 'Client: '.$arr[$r]["id"];
Perhaps, you need to set 3rd param to true.
$e["on_render_excel"] = array("custom_export", null, true);
This will continue default export operation after you function.
As your function does not complete export code, it should be true.
I try with "true" and nothing change. I received a excel file but the data of column C is not change.
You can then make 3rd param to false, and then put complete implementation inside function.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?