개발 Q&A

제목 혹시 phpexcel 이용시 다운로드하면 한글깨지는 현상
글쓴이 람이 작성시각 2016/10/28 12:49:51
댓글 : 1 추천 : 0 스크랩 : 0 조회수 : 13113   RSS

엑셀 다운로드시에 어떤 상품은 제목글자가 130자가 넘으면 표에 한글이 모두 깨져 보이고

 

어떤것은 85자만 넘어도 깨지고

 

혹시 원인이나 해결책을 아시는 분 있으신가요 ?

 

코드 이그나이트를 사용하지 않습니다.

 

 

 

 다음글 fullcalendar를 이용해서 일정관리를 만들고 있... (1)
 이전글 정말 궁금해서 물어 봅니다. (4)

댓글

람이 / 2016/10/28 13:31:13 / 추천 0

자문자답 

 

 

header("Pragma:");
header( "Content-type: application/vnd.ms-excel; charset=utf-8"); 
header( "Content-Disposition: attachment; filename='$filename'");
header("Cache-Control:max-age=0");
header("Content-Description: PHP5 Generated Data");

echo '<meta content="application/vnd.ms-excel; charset=UTF-8" name="Content-type">';
echo '<meta content="Excel.Sheet" name="ProgId">';
echo '<meta content="PHP5" name="Generator">';

 

 

이렇게 하니 해결 되네요.