<%= ASP総合 %> Part.4
■ このスレッドは過去ログ倉庫に格納されています
0426nobodyさん
2006/04/10(月) 23:13:55ID:???<%
Sub Exl
Dim ExcelApp, ExlFile, Filename, bobj ,b
Set ExcelApp = Server.CreateObject("Excel.Application")
ExcelApp.visible = True
ExlFile="D:/asp/files/temp.xls"
Filename="temp.xls"
ExcelApp.DisplayAlerts = False
ExcelApp.Workbooks.open(ExlFile)
ExcelApp.Sheets("page1").Select
ExcelApp.ActiveSheet.Range("A1").value= Year(Now()) & " 年 "
ExcelApp.ActiveSheet.PrintPreview
Excelapp.Quit
Set ExcelApp = Nothing
Response.ContentType = "application/octet-stream;name=" & Filename
Response.AddHeader "Content-Disposition","attachment;filename=" & Filename
Set bobj = Server.CreateObject("BASP21")
b = bobj.BinaryRead(ExlFile)
Set bobj = Nothing
Response.AddHeader "Content-Length", ubound(b) + 1
Response.BinaryWrite bydata
End Sub
%>
■ このスレッドは過去ログ倉庫に格納されています