复制代码 代码如下:
<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=export_data.xls");
echo "姓名"."/t";
echo "繁體"."/t";
echo "博客"."/t";
echo "/n";
echo "jason"."/t";
echo "@"."/t";
echo "javaeye"."/t";
?>
复制代码 代码如下:
header("Content-type:application/vnd.ms-excel;charset=UTF-8");
复制代码 代码如下:
echo iconv("当前编码","GB18030","此博客来源于javaeye,by jason");
复制代码 代码如下:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<style></style>
</head>
<body>
<div align=center x:publishsource="Excel">
<table x:str border=0 cellpadding=0 cellspacing=0 width=100%>
<tr><td class=xl2216681 nowrap>1234</td><td class=xl2216681 nowrap>Robbin会吐口水</td></tr>
<tr><td class=xl2216681 nowrap>5678</td><td class=xl2216681 nowrap>javaeye网站</td></tr>
</table>
</div>
</body>
</html>
复制代码 代码如下:
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=export_data.xls");
新闻热点
疑难解答