Fail to export to excel

Permalink 1 user found helpful
I use a form to receive data from users. Currently my database is having nearly 1000 records. When i try to export the data to excel, only a blank screen is displayed! Please help.

binoy
 
kino replied on at Permalink Reply
kino
I used that screen can display?

make Directory
/controllers/dashboard/reports

copy
/concrete/controllers/dashboard/reports/forms.php
to
/controllers/dashboard/reports/forms.php

change at line 30 - 35
header("Content-Type: application/vnd.ms-excel");
header("Cache-control: private");
header("Pragma: public");
$date = date('Ymd');
header("Content-Disposition: inline; filename=".$fileName."_form_data_{$date}.xls"); 
header("Content-Title: ".$surveys[$questionSet]['surveyName']." Form Data Output - Run on {$date}");

to
//header("Content-Type: application/vnd.ms-excel");
//header("Cache-control: private");
//header("Pragma: public");
//$date = date('Ymd');
//header("Content-Disposition: inline; filename=".$fileName."_form_data_{$date}.xls"); 
//header("Content-Title: ".$surveys[$questionSet]['surveyName']." Form Data Output - Run on {$date}");


try export

Once you've checked Please delete.
binoy replied on at Permalink Reply
binoy
Thank you Mr. Kino. I will try your suggestion. meanwhile I received the following message while I tried to export to excel. I could not get anything out of it. Please have a look into it.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home2/normacoi/public_html/yellow/concrete/blocks/form/controller.php on line 438
kino replied on at Permalink Reply
kino
using memory size is big.

change php.ini
memory_limit = 32M

to

memory_limit = 64M
binoy replied on at Permalink Reply
binoy
Thank you for your reply. But, Where i have to make the changes? Where is that file located?
binoy replied on at Permalink Reply
binoy
I istalled the file php.ini into my directory and made changes as you suggested. Please see below:

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

But still i get a blank screen while I ask for export to excel. Where would I have gone wrong?
Remo replied on at Permalink Reply
Remo
where's "my directory". Are you sure the webserver actually looks for the php.ini in this directory?

Did you check phpinfo(). There you should see the memory change now..
binoy replied on at Permalink Reply
binoy
Actually I do not know. I am a newbie and trying to solve this unexpected problem. Please help me to identify the real issue which gives me a blank scree while I try to export to excel. My space is in bluehost share server. In my account I have more than one websites hosted. I could get php.ini installed, but i do not know where the c5 is looking for it. Currently i have put it in the root of this c5 installation (not the root of my account with bluehost). Is that ok? kindly look into it and suggest a way out.
binoy replied on at Permalink Reply
binoy
Solved it! Thank you Kino for the lead. I made changes in the php.ini. That solved the problem. Thank you Kino and Remo for your help.
TimDix replied on at Permalink Reply
TimDix
I had to export 73k entries, which was using up more than 600MBs of memory, so instead of just increasing the PHP memory, I wrote a quick solution to split the results so that PHP can handle them easier.

Check out the solution here:http://www.concrete5.org/index.php?cID=211537#266872...