2014. 8. 4. 10:31 IT/ASP
ASP 엑셀 파일(xls)로 저장.
파일은 유니코드(서명있는 UTF-8) 코드 페이지 65001 로 저장할 것.
<%
Dim FileName : FileName = Server.urlEncode("초과근무내역_"&date()& ".xls")
Response.Buffer = True
Response.CharSet = "utf-8"
'Session.CodePage = "65001"
Response.CacheControl = "public"
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-disposition","attachment;filename="&FileName
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<table>
<tr>
<td>ASP</td>
</tr>
<tr>
<td>엑셀로</td>
</tr>
<tr>
<td>저장하기</td>
</tr>
</table>
<br/>
<table border="1">
<tr>
<td>ASP</td>
</tr>
<tr>
<td>엑셀로</td>
</tr>
<tr>
<td>저장하기(border 적용)</td>
</tr>
</table>
<br/>
<table border="1">
<tr>
<td>ASP</td>
<td>엑셀로</td>
<td>저장하기</td>
</tr>
<tr>
<td colspan="3">(colspan 적용)</td>
</tr>
</table>
<br/>
<table border="1">
<tr>
<td style="background-color:red;">ASP</td>
<td style="color:blue">엑셀로</td>
<td>저장하기</td>
</tr>
<tr>
<td colspan="3" style="text-align:center;">(style 적용)</td>
</tr>
</table>
</body>
</html>
'IT > ASP' 카테고리의 다른 글
엑셀 출력시, 문자를 숫자로 인식하는 경우.. (0) | 2014.11.06 |
---|---|
입력폼에서 같은이름의 객체를 배열로 넘겨서 사용할때 comma(쉼표) 포함시 해결법 (0) | 2014.10.13 |
ASP 접속한 단말기 및 브라우저 정보 추출 (HTTP_USER_AGENT) (0) | 2014.07.24 |
세자리 콤마 찍기. (0) | 2014.06.12 |
ASP 문자 열 함수. (0) | 2014.05.21 |