diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ScmReportService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ScmReportService.java index 813e490..e5f0a03 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ScmReportService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ScmReportService.java @@ -8,6 +8,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.DataFormatter; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; @@ -37,6 +38,7 @@ public class ScmReportService { ComponentClient componentResource; FileAttributesConfigClient fileAttributesClient; + DataFormatter formatter = new DataFormatter(); public void addScmRows(Sheet sheet, FileModel fileModel, ExcelModel excelModel) { @@ -197,7 +199,7 @@ public class ScmReportService { var iterator = firstRow.cellIterator(); while (iterator.hasNext()) { Cell cell = iterator.next(); - String cellValue = cell.getStringCellValue(); + String cellValue = formatter.formatCellValue(cell); if (fileAttributes.containsKey(cellValue)) { fileAttributeModels.add(FileAttributeModel.builder().id(fileAttributes.get(cellValue)).cell(cell).build()); }