From 8be4978348819fab5e585e6d358ccca56834c9db Mon Sep 17 00:00:00 2001 From: leebj Date: Thu, 31 Oct 2024 08:59:46 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=84=ED=83=9D=EC=8A=A4=20=EC=97=91?= =?UTF-8?q?=EC=85=80=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=ED=9B=84=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=EB=B0=9B?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=20=EC=85=80=20=EC=84=9C=EC=8B=9D=EC=9D=84?= =?UTF-8?q?=20=ED=85=8D=EC=8A=A4=ED=8A=B8=ED=98=95=EC=8B=9D=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/rent/web/Rent04Controller.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java index 8cd016d6..e1737b25 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -241,6 +241,10 @@ public class Rent04Controller extends ApplicationController { ModelAndView mav = new ModelAndView("downloadView"); XLSWriter xlsx = new XLSWriter().worksheet(0); + CellStyle unformattedText = xlsx.workbook().createCellStyle(); + short short_text = xlsx.workbook().createDataFormat().getFormat("@"); + unformattedText.setDataFormat(short_text); + List cellDefs = new ArrayList(); cellDefs.add(new CellDef().setField("A").setLabel("관리번호")); cellDefs.add(new CellDef().setField("B").setLabel("전자납부번호")); @@ -259,6 +263,12 @@ public class Rent04Controller extends ApplicationController { cellDefs.add(new CellDef().setField("O").setLabel("변경자 상세주소")); cellDefs.add(new CellDef().setField("P").setLabel("변경자 우편번호")); + Map valueMap = new HashMap(); + for(CellDef def : cellDefs) { + valueMap.put(def.getLabel(), unformattedText); + } + CellDef.setValues(cellDefs, valueMap); + List list = fromJson(query.getCellDataDef(), new TypeReference>(){}); xlsx.cell(0, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)));