I analized your library and, with satisfaction, i discovered that your solution is based on PHPExcel (one great product united to your great product make a much more great product).
You built two classes, included a wrapper to PHPExcel very easy to use but that are also not very flexible compared to PHPExcel (stand alone).
What i’d like to do is using both the approaches to overcome some problems (for istance: exporting grid with spliAt where the splitted column’s label are not exported, could be solved rewriting the cells in the sheet with the lost labels)
Always analizing your code in “generate.php” i thought to insert commands to write cells immediately after:
$excel = new gridExcelGenerator();
$excel->printGrid($xml);
A this point the function pringtGrid() just called printGridExcel() that just called createXLS() that just opened an istance of PHPExcel() named “excel”
Now the problem is how to refer to PHPExcel Istance. I tried something like that:
There is another strange problem that non depends on my modification described before because i deleted them to solve the problem.
Also with the original script Generate.php export runs correctly only for maximum 25 rows. After that seems looping without opening Excel and doesn’t produce the debug xml file. ??
Are there some limitations to the exported rows ? It looks strange.
As well for me, when I’m exporting to excel using PHP, it is really, really, really slow… Even sometimes it kills the PHP proccess… I’m trying to export around 1700 rows ( what it has to be said, it is not that much ) and major times it can’t be done…
I’m doing a exporter my myself cause the grids on is not that good. I’ve already tried in a lot of servers…
Hi,
sorry for the delay in answerring.
Unfortunately export to excel is too slow to export big datasets. The first step is to enable more resources in server configurations: available memory and maximum execution time.
You may also try to use export to HTML (it’s similar to excel and may be opened by excel, but it’s html-table format, not real excel) instead of export to excel. grid-html-php.zip (2.25 KB)
I tried html and after a lot of experiments increasing memory and max_execution_time i reach the goal to export over 1.000 rows but not always. In the page i use both Excel an Pdf Export. Trying to export 1.280 rows to Excel-html it doesn’t run the first time, but if before i export to pdf and then to Excel this time it runs. Quite strange isn’t it ? I dont undertstand this behaviour as they are two different calls to different functions.
Another question. I don’t understand why grid-excel-php has so small limitations on exporting. In my grid i reach only 25 rows exported. But Why ? Excel 2007 could list over 500.000 rows.
I tried also to increase memory abd max_execution_time but nothing has changed.
I read also about PHPExcel library but also here there are no notice of this limitations. It’s a real pity because exporting to Excel is more flexible united to PHPExcel.
Hi,
if you have troubles in exporting big dataset with grid-html-php then please, provide complete demo.
PHPExcel requires a lot of resources to process big datasets. Unfortunately it can’t produce XLS with a lot of data. Number of exported rows may be different and depends of server configurations (available memory, execution time, etc) and number of columns.
OK but in your opinion it would be possible, after exporting through grid-html-php, processing the sheet through PHPExcel to modify and format correctly the sheet, before show it (printGrid) ? If Yes how and where in generate.php or in gridHTMLGenerator.php.
Thanks.
P.S. About grid-excel-php what do you mean for big dataset ? 25 rows even if with 30/40 column doesnt’ seem to be a big dataset ?!?
I’m trying to export 30 thousand lines, now using grid_html_php, but comes on line 6829 the following error occurs:
Warning: Invalid argument supplied for foreach() in E:\web\apache\htdocs\brasa\include\dhtmlxGrid\dhtmlxGrid\codebase\grid-html-php\gridHTMLGenerator.php on line 72
Warning: Invalid argument supplied for foreach() in
E:\web\apache\htdocs\brasa\include\dhtmlxGrid\dhtmlxGrid\codebase\grid-html-php\gridHTMLGenerator.php on line 159