From 2ef4cc64b5b17d61b33e1438edf7c5da959788e6 Mon Sep 17 00:00:00 2001 From: lyutvs Date: Mon, 27 Mar 2023 11:56:07 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20::=20excel=20indexing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xquare/v1servicepoint/point/spi/ExcelSpiImpl.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/point-infrastructure/src/main/kotlin/com/xquare/v1servicepoint/point/spi/ExcelSpiImpl.kt b/point-infrastructure/src/main/kotlin/com/xquare/v1servicepoint/point/spi/ExcelSpiImpl.kt index e1754f5..eafc0e6 100644 --- a/point-infrastructure/src/main/kotlin/com/xquare/v1servicepoint/point/spi/ExcelSpiImpl.kt +++ b/point-infrastructure/src/main/kotlin/com/xquare/v1servicepoint/point/spi/ExcelSpiImpl.kt @@ -61,11 +61,6 @@ class ExcelSpiImpl( val headerRow = sheet.createRow(0) insertDataListAtRow(headerRow, attributes, getHeaderCellStyle(workbook)) - sheet.autoSizeColumn(3) - sheet.autoSizeColumn(4) - sheet.autoSizeColumn(5) - sheet.autoSizeColumn(6) - dataList.forEachIndexed { idx, dataLists -> val row = sheet.createRow(idx + 1) sheet.autoSizeColumn(idx + 1) @@ -73,6 +68,10 @@ class ExcelSpiImpl( } sheet.setColumnWidth(1, 7 * 256) + sheet.setColumnWidth(2, 5 * 256) + sheet.setColumnWidth(3, 5 * 256) + sheet.setColumnWidth(4, 37 * 256) + sheet.setColumnWidth(5, 37 * 256) ByteArrayOutputStream().use { stream -> workbook.write(stream)