我第一次使用了cfspreadsheet,我很满意。我只是想使用action =“read”显示电子表格而不是其他内容。所以我用过:
<CFSET theDir = GetDirectoryFromPath(GetCurrentTemplatePath())>
<CFSET MyReportPath = "#Trim(theDir)#Report/Rptissues/MyReport
/Report.xlsx">
<cfspreadsheet action = "read"
src="#Trim(MyReportPath)#"
query="excelquery"
sheet="1"
columns="1,2,3,4,5"
excludeHeaderRow="TRUE"></cfspreadsheet>
我能够看到查询,但那是上个月。今天当我跑的时候,我得到了:
An error occurred while reading the Excel: java.io.IOException:
/tmp/poifiles/poi-ooxml--490226367.tmp (No such file or directory).
The error occurred in /home/space/users/www/webdocsec
/advisoryindex.cfm: line 174
Called from /home/space/users/www/webdocsec/index.cfm: line 19
Called from /home/space/users/www/webdocsec/advisoryindex.cfm: line 174
Called from /home/space/users/www/webdocsec/index.cfm: line 19
172 : src="#Trim(MyReportPath)#"
173 : query="excelquery"
174 : excludeHeaderRow="TRUE"></cfspreadsheet>
175 :
我检查了路径,这是正确的。我检查了excel文件,它仍然在那里,我找不到任何有类似错误的帖子。