로딩
요청 처리 중입니다...

ASP 엑셀파일 저장시 스타일 지정

 ASP 엑셀파일 저장시 스타일 지정

이벤트 참가자 정보를 엑셀로 저장하는데 핸드폰 번호 '010...' 가 숫자로 출력되니 '10...'

로 나온다. 원래대로 '010...'

으로 나오게 하려면 숫자가 아닌 텍스트로 출력해야 한다. 셀 서식 지정할 때는 데이터 출력하는 html의 style에 MSO FORMAT을 지정하면 된다.
header("Content-type: application/vnd.ms-excel; charset=UTF-8"); header("Content-Disposition: attachment; filename = userIdentify".date("YmdHis").".xls"); header("Content-Description: PHP5 Generated Data"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); // DB커넥션 파일(PDO) require_once($_SERVER['DOCUMENT_ROOT'].'/Conn...