coldfusion

coldfusion,coldfusion,Coldfusion,我正在使用以下代码创建xls: SelectImageDetail is the query which fetches the image details from DB. <cfset LogoName=url.paths.system&"SelectImageDetail.ImgName&"."&SelectImageDetail.FileExt/> <cfcontent type="application/excel"> <cfhea

我正在使用以下代码创建xls:

SelectImageDetail is the query which fetches the image details from DB.
<cfset LogoName=url.paths.system&"SelectImageDetail.ImgName&"."&SelectImageDetail.FileExt/>
<cfcontent type="application/excel">
<cfheader name="Content-Disposition" value="inline/attachment; filename=RRInvoice.xls">
<cfoutput>
<table width="619" height="1980" >
<tr>
<cfif trim(LogoName) NEQ "" AND FileExists(#LogoName#)>
<td align="right" colspan="2"><IMG SRC="#LogoName#" ALT="" WIDTH=115 HEIGHT=90 BORDER=0>
</tr>
</table>
我可以在development server的xls中显示,但当我通过远程生产访问时,它不会显示


注意:我是通过在服务器根目录中创建目录来上传图像的。

也许我完全误解了您在这里的意图。html是否由excel自动解释

一件似乎不正确的事情是内联/附件。我相信您只想使用内联或附件,而不是两者。它们是向浏览器提供文件的两种不同方法


如果更改为仅使用其中一个选项不起作用,请通过删除cfcontent/cfheader排除excel,然后查看html输出是否正确。

这是一个好方法,我可以在本地开发中尝试。我将在excelDan Roberts中提供图像的相对路径,谢谢您的时间