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";
;?>也出现乱码,怎么解决,大侠们
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
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28