<%
'Set the content type to the specific type that you are sending.
Response.ContentType = "application/x-msexcel"
Const adTypeBinary = 1
Dim strFilePath
strFilePath = "C:\ExcelFiles\Excel1.xls" 'This is the path to the file on disk.
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
%>
posted on 2007-06-09 07:56
汪杰 阅读(215)
评论(0) 编辑 收藏 引用 所属分类:
javascript