ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文
【ASP&PHP】 Excelを開かずにダウンロードする
日時: 2009/02/22 00:33
名前: lightbox





呼び出し : excel.asp?fname=format_00_week_report

拡張子:
<%
Response.ContentType = "application/vnd.ms-excel"
Response.Addheader "Content-Disposition", "attachment; filename=" & Request.QueryString("fname") & ".xls"
Response.ExpiresAbsolute=#May 31,2000 23:59:59#

Set Stream = Server.CreateObject("ADODB.Stream")
Stream.Open
Stream.Type = 1	' StreamTypeEnum の adTypeBinary
Stream.LoadFromFile Server.MapPath( Request.QueryString("fname") & ".xls" )
Response.BinaryWrite Stream.Read
Stream.Close
Set Stream = Nothing
%>
以下 HTTPヘッダ
拡張子:
HTTP/1.1 200 OK
Date: Thu, 08 Mar 2007 12:51:51 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MicrosoftOfficeWebServer: 5.0_Pub
Content-Disposition: attachment; filename=format_00_week_report.xls
Content-Length: 32256
Content-Type: application/vnd.ms-excel
Expires: Wed, 31 May 2000 14:59:58 GMT
Cache-control: private
↓PHP
拡張子:
<?
header( "Content-Type: application/vnd.ms-excel" );
header( "Content-Disposition: " . "attachment; filename=" . $_GET["fname"] . ".xls" );
header( "Expires: Wed, 31 May 2000 14:59:58 GMT" );

$data = @file_get_contents( $_GET["fname"] . ".xls" );
print $data;
?>
メンテナンス

Excel 書式ダウンロード ( No.1 )
日時: 2007/06/11 11:07
名前: lightbox


日時: 2007/06/11 11:07
名前: lightbox
テーブル設計書は、SQLの窓 Build C++ で BatchHelper オブジェクトをインストール
すると、メニューから作成できます( Microsoft Excel が必要です )


【テーブル設計書】
(http://lightbox.on.coocan.jp/format/excel.php?fname=table_spec)

【コード設計書】
(http://lightbox.on.coocan.jp/format/excel.php?fname=code_spec)

【作業指示書】
(http://lightbox.on.coocan.jp/format/excel.php?fname=woking_protocol)

【週間作業報告書】
(http://lightbox.on.coocan.jp/format/excel.php?fname=week_report)

【作業準備用 の 概要書】
(http://lightbox.on.coocan.jp/format/excel.php?fname=outline)
このアーティクルの参照用URLをクリップボードにコピー メンテナンス