如何让ASP页面能打开Office文档文件
如何让ASP页面能打开如下Office文档文件:
PowerPoint文档文件 *.PPT
Excel文档文件 *.XLS
Word文档文件 *.DOC
谢谢解疑!
NewOper = ""
SQL = ""
SQL = SQL & "SELECT * FROM Require_deal Where FLOWSN = '" & FLOWSN & "'"
Rs.open SQL,CONN,1,1
I = 0
Do while Not rs.Eof
I = I + 1
If I > 1 then
response.write"<br>"
End If
' str = "<a href='" & trim(rs.fields("ATTACH_NAME")) & "'>" & trim(rs.fields("ATTACH_NAME")) & "</a>"
str = "<a href="""& trim(rs.fields("ATTACH_NAME")) &""">" & trim(rs.fields("ATTACH_NAME")) & "</a> <a href=""delf4.asp?filename2="& trim(rs.fields("ATTACH_NAME")) &""" onClick=""if (confirm('是否删除选择的文件')) {return true} else {return false}"">删除</a>"
response.write str
Rs.MoveNext
Loop
Rs.Close
If I = 0 then
response.write "."
End If
这段是让文件在页面上显示,并且可以打开,试试
ATTACH_NAME 是数据库中存储文件名的字段名