<td
style
=
'mso-number-format: "@";'
>01034567890</
td
>
요런식으로 지정하면 "010" 요런 문자도 "10"으로 표시되지 않고 "010"으로 잘 나옴
<
h3
>회원 목록</
h3
>
<
table
border
=
"1"
>
<
thead
>
<
tr
>
<
th
>ID</
th
>
<
th
>이름</
th
>
<
th
>전화번호</
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tr
>
<
td
>patriot2</
td
>
<
td
>유관순</
td
>
<
td
style
=
'mso-number-format: "@";'
>0431234567</
td
>
</
tr
>
<
tr
>
<
td
>pitcher</
td
>
<
td
>류현진</
td
>
<
td
style
=
'mso-number-format: "@";'
>01034567890</
td
>
</
tr
>
<
tr
>
<
td
>historian</
td
>
<
td
>신채호</
td
>
<
td
>001886123456</
td
>
</
tr
>
</
tbody
>
</
table
>
다른 형식은 요거 참고
Styling Excel cells with mso-number-format
mso-number-format:"0" | NO Decimals |
mso-number-format:"0\.000" | 3 Decimals |
mso-number-format:"\#\,\#\#0\.000" | Comma with 3 dec |
mso-number-format:"mm\/dd\/yy" | Date7 |
mso-number-format:"mmmm\ d\,\ yyyy" | Date9 |
mso-number-format:"m\/d\/yy\ h\:mm\ AM\/PM" | D -T AMPM |
mso-number-format:"Short Date" | 01/03/1998 |
mso-number-format:"Medium Date" | 01-mar-98 |
mso-number-format:"d\-mmm\-yyyy" | 01-mar-1998 |
mso-number-format:"Short Time" | 5:16 |
mso-number-format:"Medium Time" | 5:16 am |
mso-number-format:"Long Time" | 5:16:21:00 |
mso-number-format:"Percent" | Percent - two decimals |
mso-number-format:"0%" | Percent - no decimals |
mso-number-format:"0\.E+00" | Scientific Notation |
mso-number-format:"\@" | Text |
mso-number-format:"\#\ ???\/???" | Fractions - up to 3 digits (312/943) |
mso-number-format:"\0022£\0022\#\,\#\#0\.00" | £12.76 |
mso-number-format:"\#\,\#\#0\.00_ \;\[Red\]\-\#\,\#\#0\.00\ " |
2 decimals, negative numbers in red and signed |
<참고> 엑셀 다운로드용 jsp 선언
<%@ page language="java" contentType="application/vnd.ms-excel; name='excel', text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
response.setHeader("Content-Disposition", "attachment; filename=diary.xls");
response.setHeader("Content-Description", "JSP Generated Data");
response.setContentType("application/vnd.ms-excel");
%>
'Dev. 웹 > HTML.JSP' 카테고리의 다른 글
input text 입력창에서 한글/ 영어 default 값 설정 및 사용여부 적용 (0) | 2014.03.18 |
---|---|
웹 페이지에서 SSL 없이 RSA 암호화 로그인 하기 (0) | 2013.11.26 |
[JSP/Servlet] 서블릿 + JDBC 사용시 주의사항 (필독) (0) | 2013.10.11 |
[JSP/Servlet] JSP? CLASS? SERVLET? 개요 (0) | 2013.10.08 |
[HTML 팁] META TAG - viewport ( 모바일 기기에 대한 화면 적정 출력 태그 ) 에 관한 글 (0) | 2013.09.23 |