diff --git a/build.gradle b/build.gradle index ecbd3975..8ff92ecb 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group 'com.docutools' -version = '1.3.1' +version = '1.3.2' sourceCompatibility = 17 targetCompatibility = 17 diff --git a/src/main/java/com/docutools/jocument/impl/excel/implementations/ExcelGenerator.java b/src/main/java/com/docutools/jocument/impl/excel/implementations/ExcelGenerator.java index cc540f01..797dd770 100644 --- a/src/main/java/com/docutools/jocument/impl/excel/implementations/ExcelGenerator.java +++ b/src/main/java/com/docutools/jocument/impl/excel/implementations/ExcelGenerator.java @@ -4,6 +4,7 @@ import com.docutools.jocument.PlaceholderResolver; import com.docutools.jocument.PlaceholderType; import com.docutools.jocument.impl.ParsingUtils; +import com.docutools.jocument.impl.ScalarPlaceholderData; import com.docutools.jocument.impl.excel.interfaces.ExcelWriter; import com.docutools.jocument.impl.excel.util.ExcelUtils; import com.google.common.collect.Lists; @@ -73,7 +74,8 @@ private void generate() { if (ExcelUtils.isSimpleCell(cell)) { excelWriter.addCell(cell); } else { - var newCellText = resolver.resolve(ExcelUtils.getPlaceholder(cell)).orElseThrow(); + var newCellText = resolver.resolve(ExcelUtils.getPlaceholder(cell)) + .orElse(new ScalarPlaceholderData("-")); excelWriter.addCell(cell, newCellText.toString()); } }