Excel open error, reducing the amount of data that can be successfully opened

Topics: User Forum
May 22, 2014 at 9:36 AM
Hi:
   There is a table you want to export xls, there are 58 fields of data has reached 6530 line, the time it takes to export 4 assigned to five minutes, and the file does not open after export, suggesting wrong, if delete a field or row reducing the number of dozens of lines, the same operation, and can be exported to open, and now can not find the cause of the error, is there any solution?
Coordinator
May 22, 2014 at 9:42 AM
Have you looked at your error logs to see if you're getting a timeout or a memory limit? Have you looked at cell caching to reduce memory (if that's an issue). Have you considered that your script might be using PHPExcel inefficiently?
May 22, 2014 at 9:52 AM
Edited May 22, 2014 at 9:53 AM
Excel normally exported, but open error
it use
set_time_limit(0);
ini_set('memory_limit','2024M');
require_once("Classes/PHPExcel.php"); 
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip; 
$cacheSettings = array();
PHPExcel_Settings::setCacheStorageMethod($cacheMethod,$cacheSettings); 
$objPHPExcel = new PHPExcel();
....
....
....
....
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
header('Content-Type: application/vnd.ms-excel; charset=utf-8');  
header("Content-Disposition: attachment; filename=".$excelName);
header('Cache-Control: max-age=0');
header("Pragma: no-cache");
$objWriter->save('php://output');
Coordinator
May 22, 2014 at 10:08 AM
Have you tried opening the file in a text editor to see if it contains leading/trailing white space, BOM header, other html markup, or any obvious plaintext PHP error messages?
May 22, 2014 at 11:41 AM
Edited May 22, 2014 at 11:45 AM
All total of 443,552 lines.
The beginning of the 100 lines:
d0cf 11e0 a1b1 1ae1 0000 0000 0000 0000
0000 0000 0000 0000 3b00 0300 feff 0900
0600 0000 0000 0000 0000 0000 6d00 0000
b635 0000 0000 0000 0010 0000 0000 0000
0100 0000 2436 0000 0000 0000 b735 0000
b835 0000 b935 0000 ba35 0000 bb35 0000
bc35 0000 bd35 0000 be35 0000 bf35 0000
c035 0000 c135 0000 c235 0000 c335 0000
c435 0000 c535 0000 c635 0000 c735 0000
c835 0000 c935 0000 ca35 0000 cb35 0000
cc35 0000 cd35 0000 ce35 0000 cf35 0000
d035 0000 d135 0000 d235 0000 d335 0000
d435 0000 d535 0000 d635 0000 d735 0000
d835 0000 d935 0000 da35 0000 db35 0000
dc35 0000 dd35 0000 de35 0000 df35 0000
e035 0000 e135 0000 e235 0000 e335 0000
e435 0000 e535 0000 e635 0000 e735 0000
e835 0000 e935 0000 ea35 0000 eb35 0000
ec35 0000 ed35 0000 ee35 0000 ef35 0000
f035 0000 f135 0000 f235 0000 f335 0000
f435 0000 f535 0000 f635 0000 f735 0000
f835 0000 f935 0000 fa35 0000 fb35 0000
fc35 0000 fd35 0000 fe35 0000 ff35 0000
0036 0000 0136 0000 0236 0000 0336 0000
0436 0000 0536 0000 0636 0000 0736 0000
0836 0000 0936 0000 0a36 0000 0b36 0000
0c36 0000 0d36 0000 0e36 0000 0f36 0000
1036 0000 1136 0000 1236 0000 1336 0000
1436 0000 1536 0000 1636 0000 1736 0000
1836 0000 1936 0000 1a36 0000 1b36 0000
1c36 0000 1d36 0000 1e36 0000 1f36 0000
2036 0000 2136 0000 2236 0000 2336 0000
0100 0000 0200 0000 0300 0000 feff ffff
0500 0000 0600 0000 0700 0000 feff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
feff 0000 0601 0200 0000 0000 0000 0000
0000 0000 0000 0000 0100 0000 e085 9ff2
f94f 6810 ab91 0800 2b27 b3d9 3000 0000
b800 0000 0700 0000 0100 0000 4000 0000
0200 0000 4800 0000 0400 0000 6800 0000
0800 0000 8000 0000 0c00 0000 9800 0000
0d00 0000 a400 0000 1300 0000 b000 0000
0200 0000 e404 0000 1e00 0000 1800 0000
556e 7469 746c 6564 2053 7072 6561 6473
6865 6574 0000 0000 1e00 0000 1000 0000
556e 6b6e 6f77 6e20 4372 6561 746f 7200
1e00 0000 1000 0000 556e 6b6e 6f77 6e20
4372 6561 746f 7200 4000 0000 801f f2aa
8468 cf01 4000 0000 801f f2aa 8468 cf01
0300 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
feff 0000 0601 0200 0000 0000 0000 0000
0000 0000 0000 0000 0100 0000 02d5 cdd5
9c2e 1b10 9397 0800 2b2c f9ae 3000 0000
bc00 0000 0800 0000 0100 0000 4800 0000
1700 0000 5000 0000 0b00 0000 5800 0000
1000 0000 6000 0000 1300 0000 6800 0000
1600 0000 7000 0000 0d00 0000 7800 0000
0c00 0000 8e00 0000 0200 0000 e404 0000
0300 0000 0000 0c00 0b00 0000 0000 0000
0b00 0000 0000 0000 0b00 0000 0000 0000
0b00 0000 0000 0000 1e10 0000 0100 0000
0a00 0000 576f 726b 7368 6565 7400 0c10
0000 0200 0000 1e00 0000 1300 0000 4665
7569 6c6c 6573 2064 6520 6361 6c63 756c
0003 0000 0001 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0908 1000 0006 0500 bb0d cc07 d100 0100
0604 0000 4200 0200 b004 3d00 1200 0000
0000 bc25 7215 3800 0000 0000 0100 5802
2200 0200 0000 3100 1e00 dc00 0000 0800
The last part:
8135 0000 8235 0000 8335 0000 8435 0000
8535 0000 8635 0000 8735 0000 8835 0000
8935 0000 8a35 0000 8b35 0000 8c35 0000
8d35 0000 8e35 0000 8f35 0000 9035 0000
9135 0000 9235 0000 9335 0000 9435 0000
9535 0000 9635 0000 9735 0000 9835 0000
9935 0000 9a35 0000 9b35 0000 9c35 0000
9d35 0000 9e35 0000 9f35 0000 a035 0000
a135 0000 a235 0000 a335 0000 a435 0000
a535 0000 a635 0000 a735 0000 a835 0000
a935 0000 aa35 0000 ab35 0000 ac35 0000
ad35 0000 ae35 0000 af35 0000 b035 0000
b135 0000 b235 0000 b335 0000 b435 0000
b535 0000 feff ffff feff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
fdff ffff fdff ffff fdff ffff fdff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
May 23, 2014 at 8:52 AM
Can you help me?