게시글
PHP내용 엑셀파일로 다운받기
php에서 엑셀파일형식으로 다운받고 싶을때가 있다 이럴때 사용하는 방법으로 table태그형태로 엑셀 파일이 그대로 다운받아진다 회원정보,부동산매물정보,자동차매물정보,기타매물 정보등을 다운받을때 사용하는 소스이다 header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=엑셀파일명.xls"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); header부분을 선언해주고 아래 엑셀로 저장할 내용을 table형태로 작성한후에 해당페이지를 접속하면 자동을 엑셀로 다운받기가 나타난다
#프로그램 #php #소스 #엑셀다운로드 #엑셀파일저장 #header함수 #xls #데이터내보내기