728x90
Controller
JXLS EXCEL Templates์ ๊ทธ๋ฃน์ ์ฌ๋ฌ ๊ฐ ์ฌ์ฉํ๋ฉด [BK] cell ์ดํ ๊ทธ๋ฃน์ผ๋ก ๋ฌถ์ ๊ฐ๋ค์ ๋์ค์ง ์๋๋ค.
Map<String,Object> m0 = new HashMap<String,Object>();
m0.put("list", list); m0.put("title","์ ๋ชฉ1");
Map<String,Object> m1 = new HashMap<String,Object>();
m1.put("list", list1); m1.put("title","์ ๋ชฉ2");
List listAll = new ArrayList();
listAll.add(m1);
listAll.add(m2);
Context context = new Context();
context.putVar("listAll", listAll);
HashMap<String, Object> doc = new HashMap<String, Object>();
doc.put("templateName","ํ
ํ๋ฆฟ์ด๋ฆ");
doc.put("sheetName","์ํธ์ด๋ฆ");
doc.put("context",context);
service.downExcel(doc, request, response);
Excel Templates
ํด๊ฒฐํ๋ฐฉ๋ฒ์ ๋ฆฌ์คํธ๋ฅผ ๊ฐ๊ฐ ๋ฟ๋ฆฌ์ง ๋ง๊ณ ๋ฆฌ์คํธ ํ๋๋ฅผ each๋ฌธ์ผ๋ก ๋๋ฆฌ์.
๋ง๋ ์ด: jx:area(lastCell="U6") jx:each(items="listAll" var="la" lastCell="U6" direction="RIGHT" groupBy="list")
'Spring' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[MAVEN] java.util.zip.ZipException: invalid LOC header (bad signature) ์ค๋ฅ (0) | 2021.08.12 |
---|---|
[JXLS] jx:if(condition ์ํ๋ ์ ์์ ๋ณ๊ฒฝํ๊ธฐ (0) | 2021.08.11 |
[Spring] @RequestBody / @ResponseBody ์ฐจ์ด (0) | 2021.05.28 |
[JXLS] ์์ ๋ค์ด๋ก๋ (3) | 2021.05.06 |
[Mybatis] ๋ฐฉ๊ธ insert ๊ฐ select ํ๊ธฐ <selectKey> (6) | 2021.05.04 |