ASP
엑셀
<%
Response.Buffer = TRUE
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-disposition","attachment;filename=저장/오픈할 파일명.xls"
%>
워드
<%
Response.Buffer = TRUE
Response.ContentType = "application/msword"
Response.AddHeader "Content-disposition","attachment;filename=저장/오픈할 파일명.doc"
%>
파워포인트
<%
Response.Buffer = TRUE
Response.ContentType = "application/powerpoint"
Response.AddHeader "Content-disposition","attachment;filename=저장/오픈할 파일명.doc"
%>
html 태그 위에 카피 & 페이스트.
application/pdf
application/vnd.ms-excel
application/vnd.ms-powerpoint
application/word
application/x-mspowerpoint
application/x-msexcel
JSP
<%@ page contentType="application/vnd.ms-excel; name='My_Excel'" %>
<%
response.setHeader("Content-Disposition", "inline; filename=myfile.xls");
response.setHeader("Content-Description", "JSP Generated Data");
%>
PHP
<?
header(\"Content-Type: application/vnd.ms-excel\");
?>
'ASP' 카테고리의 다른 글
| 초보도 만드는 IP 조회(ip locator) 페이지 구현 (0) | 2010/06/30 |
|---|---|
| [ASP블로그]ASP, RSS로 데이터 보내기 (0) | 2009/02/16 |
| ms-sql 컬럼내용 암호화 (0) | 2009/01/27 |
| SQL-INJECTION(인젝션) 차단하기. (0) | 2009/01/25 |
| 웹페이지 워드,엑셀,파워포인트로 변환 (0) | 2009/01/20 |
