+ -
当前位置:首页 → 问答吧 → php excel导出

php excel导出

时间:2011-07-20

来源:互联网

excel_class.php哪位前辈用过?导出出现乱码怎么回事。除此以外,换成最简单的php导出程序,如<?php 
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=test_data.xls");

$tx='表头';  
mb_convert_encoding($tx,"gbk","utf-8");
echo $tx."\n\n";  
//输出内容如下:  
echo "姓名"."\t";  
echo "年龄"."\t";  
echo "学历"."\t";  
echo "\n";  
echo "张三"."\t";  
echo "25"."\t";  
echo "本科"."\t";  


;?>也出现乱码,怎么解决,大侠们

作者: zongwuzong   发布时间: 2011-07-20

补充:excel_class.php中有 Create_Excel_File这样的方法。哪位大侠遇到相同问题,从数据库中查询到的数据 插入 excel中 是乱码。 数据库 与 程序 编码都是utf-8,查询数据库时也加了set names utf8,请问下面问题出现在哪

作者: zongwuzong   发布时间: 2011-07-20

热门下载

更多