应该不是html的问题 如果我加一个<td>a</td>就出现乱码,如果不加则显示正常。是不是excel保存有列的限制啊 大家帮我想想办法哦
解决方案 »
- 帮我把这函数精简下啊,,
- LINUX下数组写成$_SESSION[userid]报错,WINDOWS服务器下面就可以,这是为什么啊!!!急
- PHP数据保存为doc文件时如何自动换行?
- 加密的sqlite3扩展DLL文件
- unix平台下若不重装PHP,能在原来的基础上加一个新模块吗?
- 修改php.ini 后是否需要重新启动apache或者服务器?
- 更新sql内容以后返回的值是什么内容?
- 数据库操作函数前面加@与不加@的区别?
- 实在搞不定了,session在什么情况下会变空?
- 求个一个smarty写的注册登录页面
- 查询结果如何生成固定格式的EXCEL文件
- 恳请高手赐教 php 操作 word excel 的详细参考文档!!!
Response.ContentEncoding = System.Text.Encoding.UTF7;
include "function.inc";
header("Content-type: application/vnd.ms-excel 5.0");
header("Content-Disposition: filename=operator_value.xls");
header("Content-Description: operator_value");
$conn=0;
$donotclose=1;
$packname="operator_value_download.phtml";
echo "
<STYLE>
BODY {
SCROLLBAR-FACE-COLOR: #a8cbf1;
SCROLLBAR-HIGHLIGHT-COLOR: #a8cbf1;
SCROLLBAR-SHADOW-COLOR: #a8cbf1;
SCROLLBAR-3DLIGHT-COLOR: #ffffff;
SCROLLBAR-ARROW-COLOR: #ffffff;
SCROLLBAR-TRACK-COLOR: #a8cbf1;
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;
SCROLLBAR-BASE-COLOR: #a8cbf1;
BACKGROUND-COLOR: #f2fafd
}
TABLE {
FONT-SIZE: 9pt;
}
</STYLE>
<BODY background=images/bg.gif>
<CENTER>
<P></CENTER>
<P>
";echo "
<P><CENTER><BR>
<strong><font color=#0000FF>局向:$county_name 营业厅:$yyt (org_id=$org_name) $day 日<font color=#FF0099> 营业员积分</font></strong>
<table borderColor=#CC6600 width=2000 border>
<tr>
<th rowspan=2 bgcolor=#FFEEE6 width=40><div align=center>1</div></th>
<th rowspan=2 bgcolor=#FFEEE6 width=40><div align=center>1</div></th>
<th rowspan=2 bgcolor=#FFEEE6 width=60><div align=center>1</div></th>
<th rowspan=2 bgcolor=#FFEEE6 width=60><div align=center>1</div></th>
<th colspan=3 bgcolor=#CCFFFF width=60><div align=center>1</div></th>
<th colspan=4 bgcolor=#FFEEE6 width=60><div align=center>1</div></th>
<th colspan=4 bgcolor=#D7FFD7 width=60><div align=center>1</div></th>
<th colspan=1 bgcolor=#cccccc width=60><div align=center>1</div></th>
<th colspan=4 bgcolor=#ACEDF9 width=60><div align=center>1</div></th>
<th colspan=1 bgcolor=#cccccc width=60><div align=center>1</div></th>
<th rowspan=2 bgcolor=#ACEDF9 width=60><div align=center>1</div></th>
<th colspan=19 bgcolor=#FFEEE6 width=60><div align=center>1</div></th>
<th rowspan=2 bgcolor=#cccccc width=60><div align=center>1</div></th>
</tr>
<th bgcolor=#CCFFFF align=center nowrap>1</th>
<th bgcolor=#CCFFFF align=center nowrap>1</th>
<th bgcolor=#CCFFFF align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#D7FFD7 align=center nowrap>1</th>
<th bgcolor=#D7FFD7 align=center nowrap>1</th>
<th bgcolor=#D7FFD7 align=center nowrap>1</th>
<th bgcolor=#D7FFD7 align=center nowrap>1</th>
<th bgcolor=#cccccc align=center nowrap>1</th>
<th bgcolor=#ACEDF9 align=center nowrap>1</th>
<th bgcolor=#ACEDF9 align=center nowrap>1</th>
<th bgcolor=#ACEDF9 align=center nowrap>1</th>
<th bgcolor=#ACEDF9 align=center nowrap>1</th>
<th bgcolor=#cccccc align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1/th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
<th bgcolor=#FFEEE6 align=center nowrap>1</th>
在此添加报错 请各位看看
</tr>
";
$excel = new COM("Excel.sheet") or Die ("Did not instantiate Excel");// 建立EXCEL的COM对象错误信息:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `Excel.sheet': 拒绝访问。 ' in E:\iis\libraire\excel\excel.php:40 Stack trace: #0 E:\iis\libraire\excel\excel.php(40): com->com('Excel.sheet') #1 E:\iis\libraire\excel\testclass.php(28): Excel->excel() #2 {main} thrown in E:\iis\libraire\excel\excel.php on line 40
我用的IIS(6.0)+windows 2003 server
我的QQ:531515035
email :jiehan126.com
谢谢指点