0

Hello I have an issue that I never had before. I have a SQL query that gather data from a table and show the complete data in the web app. I also have a script in PHP to export this report to a xls format.

My issue is when I export my data to a xls format, the last results are missing. If my report have 400 results, the excel file has only 147 ones.

This is the first time it happens to me.

You can se my export function bellow:

<?php
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header("Pragma: no-cache");
header("Expires: 0");
header('Content-Transfer-Encodind: none');
header('Content-type: application/vnd.ms-excel; name=excel;');
header('Content-type: application/x-ms-excel;');
header('Content-Disposition: attachment;  
filename="'.basename('Reporte_egresados - '.Date("Y-m-d").'.xls').'"');
header('Content-Type: text/html; charset=UTF-8'); 
echo utf8_decode($_POST['datos_a_enviar']);
?>

About the php file that show the data in the web app, I didn't use a limit or something on the results.

2
  • If you are on shared hosting, may be it is about some other php limits?
    – HddnTHA
    Feb 24, 2015 at 17:04
  • The web app is working on the University server, I'd have to ask for those limits, thanks.
    – He_slp13
    Feb 24, 2015 at 17:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.