Excel convert service problem with large number of record

Hi ,
I try to use convert excel server side service component to export a complex and large table ( with active debug xml is around 7,5 MB) .
Operation start ,after few minuts operation stop and any happen
can you help me ??

Thanks a lot !!
Antonello

Hi,
it would be much more better to use export to html or csv instead of export to excel (export to csv/html will generate excel-file too, but it will be in another format which is much more easier to produce).
You may find grid-html-php in attachment.
grid-html-php.zip (2.25 KB)

Hi ,

The problem is not resolved .
After 2/3 minuts the browser activity stop before xml debug file was been created.
I think because we have a complex “beforeRender function” attached to grid to format Grid data.
There is a possibility to change GridHtmlGenerator code, to generate a file on server instead through raw http content disposition ??

Many thanks
Best regards

The main problem is that dataset is too big. It takes a lot of time to get it from database and generate required request to export service. Unfortunately there is no way to make it faster with so many records. You should set bigger value for max_execution_time.

There is no way to do that.

Hi,

I learned fom this topi how to export a large file witj csv/html method but when th file is too large, the excel file is empty. Is it also a result of post_max_size parameter or max_execution_time ?

thx

Hi,
you should have a look at error which appears during export - it help to understand which option must be bigger to provide available resources. If you don’t see any php error then please, comment the follow line of code in file generate.php:

//$error_handler = set_error_handler("PDFErrorHandler");

in case of not enough storage , what can be increased to make it works ?

by the way, i used degug==true… your code line get any result

sorry I’m a profane in php and that style of code

Hope this is not to late to help.
I to had a similar issue with exporting a big data sets (almost 4300 rows) to excel.

Sometimes it would stop exporting at 1584 lines and others it would stop at 3167 lines.
All the exported rows were in the error log file generated by the export process.

The problem (for me) was that PHP Script timed out before the export operation could complete.

To resolve this in my case I added the following line of code to generate.php after session_start()

set_time_limit(180);

I’m not sure if this is the best solution so I would appreciate any responses in relation to this post.

I hope this helps.

Hi fab1970,
unfortunately there is no way to export big dataset if there is no enough space.
But suggestion of elroco may be correct. Maybe the problem is execution timeout.
The best way would be to comment the follow line in generate.php:

//$error_handler = set_error_handler("PDFErrorHandler");

And use grid.toPDF(…) instead grid.toExcel(…) at client side. It must open export result in new tab in this case so you have ability to get details about error.

To Convert any HTML or HTM page to MS Excel use any manual method but think once before doing this because manual method can not convert perfectly and data loss may occur, so the converter is the best option for you. Download HTML to Excel converter and do this conversion with ease. Free download this tool from: softwaredownloadcentre.com/s … verter.php