CSV JSP 부분
구분자 ,
개행문자 "
<%@ page contentType="text/html;charset=utf-8" %>
<%@ include file="/WEB-INF/jsp/egovframework/cmmn/taglibs.jsp"%>
<%@ page trimDirectiveWhitespaces="true" %> //줄바꿈 삭제
<%
response.setHeader("Content-Type", "text/csv; charset=MS949");
response.setHeader("Content-Disposition", "attachment;filename=CsvDownload.csv");
%>
<c:forEach items="${surveyPopList}" var="list" varStatus="i" >
"${list.sd_name}","${list.area}","${list.quantity}"
<c:forEach items="${surveySggList}" var="sggList" varStatus="i" >
<c:if test="${list.sd_name == sggList.sd_name}">
"${sggList.sgg_name}","${sggList.area}","${sggList.quantity}","${sggList.department}","${sggList.contact}"
</c:if>
</c:forEach>
</c:forEach>
<c:if test="${!empty surveyPopList}">
"합계","${totArea}","${totQuantity}"
</c:if>
<c:if test="${empty surveyPopList}">
"조회 된 데이터가 없습니다."
</c:if>
'develop > jsp' 카테고리의 다른 글
썸넴일 클릭 시 큰화면으로 보여주는 방법 (0) | 2016.07.01 |
---|---|
CKEditor 사용 및 파일 업로드 적용 (0) | 2016.03.25 |