Ecshop export excel data
Elseif ($ _ REQUEST ['AC'] = 'exec ') {$ user = exec_user (); $ filename = ecs_iconv (EC_CHARSET, 'gb2312 ', 'user information'); header ("Content-type: application/vnd. ms-excel; charset = utf-8 "); header (" Content-Disposition: attachment; filename=$filename.xls "); $ data = "member \ t province \ t City \ t district \ t shipping address \ t partition \ t line \ t salesman \ t business manager \ n "; foreach ($ user as $ item) {$ data. = "$ item [user_name] \ t"; $ data. = "$ item [province] \ t"; $ data. = "$ item [city] \ t"; $ data. = "$ item [district] \ t"; $ data. = "$ item [address] \ t"; $ data. = "$ item [dist_name] \ t"; $ data. = "$ item [thread_name] \ t"; $ data. = "$ item [saleman] \ t"; $ data. = "$ item [manage] \ n";} echo ecs_iconv (EC_CHARSET, 'gb2312 ', $ data ). "\ t"; exit ;}
Print_r ($ user); more than 200 pieces of data are exported; pieces are exported. why? is there a problem with the code? thank you for your advice.
Reply to discussion (solution)
Is the page stuck?
Is the memory allocated to php sufficient?
Is the 200 rows of data normal when the xls file is opened?
The problem is found. it is caused by special characters. thank you.