PHP 프로그래밍

본문 바로가기
사이트 내 전체검색


PHP 프로그래밍
PHP 프로그래밍

1. PHP 엑셀 셀 서식 텍스트로 변경하기

페이지 정보

작성자 관리자 댓글 0건 조회 3,326회 작성일 18-09-11 12:24

본문

1. PHP 엑셀 셀 서식 텍스트로 변경하기

엑셀에서 "셀 서식 - 표시형식 - 범주 - 일반" 이다 보니.

 

1,2,3,4,5...등의 형식의 숫자는 이상이 없지만

 

001,002,003... 등의 형식은 자동으로 1로 변경됩니다.

 

디비에는 0012345로 저장 되어 있는 문자열이 엑셀로 다운 받아서 열어보면 12345로 되어 있더군요.

 

해결 방법 찾아 냈습니다.

 

 

td style에 속성을 추가해 주시면 해결됩니다.

<td style='mso-number-format:"\@";'>(숫자 데이터)</td>

숫자 천단위 마다 (,)를 찍고자 할때는 이렇게 사용하세요.
<td style='mso-number-format:"\#\,\#\#0_;'> (숫자 데이터)</td>

 

 

 

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(1.56 -1.56)


댓글목록

등록된 댓글이 없습니다.


개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.