Fixed Columns-Header in A1-Report shifted to the right
This commit is contained in:
aoezyetimoglu 2021-11-09 20:17:45 +01:00
parent 706d86a899
commit 1c1e26ec89

View File

@ -292,6 +292,8 @@ public class WordReportGenerationService {
if (containsRedactionPlaceholder(cell.getText())) {
placeholderCellPos.put(i, cell.getText());
placeholderRow = j;
} else if (cell.getText().isEmpty()) {
placeholderCellPos.put(i, "");
}
}
}
@ -300,7 +302,11 @@ public class WordReportGenerationService {
reportEntries.forEach(entry -> {
XWPFTableRow row = table.createRow();
for (Map.Entry<Integer, String> entry1 : placeholderCellPos.entrySet()) {
setText(row.getCell(entry1.getKey()), replaceTextPlaceholderWithEntries(entry, filename, entry1.getValue()));
if(!entry1.getValue().isEmpty()) {
setText(row.getCell(entry1.getKey()), replaceTextPlaceholderWithEntries(entry, filename, entry1.getValue()));
} else {
setText(row.getCell(entry1.getKey()), "");
}
}
});
}