Export the Excel case column in PHP. PHP export Excel case column $ dataarray (); $ data $ app-getStatisApp (2, $ username, $ whereDepartment, $ status, $ level, $ time); $ strmb_convert_encoding (name, level 1 Department, Department, directly under the PHP export Excel case column
$ Data = array ();
$ Data = $ app-> getStatisApp (2, $ username, $ whereDepartment, $ status, $ level, $ time );
$ Str = mb_convert_encoding ("name, level-1 Department, Department, immediate superior, start time \ n", 'gbk', 'utf8 ');
$ Filename = "progress statistics on the review of the probation application form ";
$ Filename = mb_convert_encoding ($ filename, 'gbk', 'utf8 ');
Ob_end_clean ();
Header ("HTTP/1.1 200 OK ");
Header ('content-Encoding: none ');
Header ('content-type: text/csv ');
Header ("Content-Disposition: attachment?filename=#filename=.csv ");
Header ('cache-Control: must-revalidate, post-check = 0, pre-check = 0, max-age = 31536000 ');
Header ('expires: 0 ');
Header ('pragma: public ');
Foreach ($ data as $ value ){
$ Str. = mb_convert_encoding ("{$ value ['truename']}, {$ value ['oneobao']}, {$ value ['two']}, {$ value ['leadertruename']}, {$ value ['entry _ time']}, {$ value ['formal _ time']} \ n ", 'gbk', 'utf8 ');
}
Echo $ str;
Response $ data = array (); $ data = $ app-getStatisApp (2, $ username, $ whereDepartment, $ status, $ level, $ time ); $ str = mb_convert_encoding (name, level-1 Department, Department, directly under...