I am trying to create a simple table with one column.
I create a new row and in each row a new paragraph. The problem is that each row starts with one empty line - I guess the new paragraph creates it.
I was trying to set spacing before, indentation etc. with no success.
for (int i=0; i<questions.size(); i++) {
Question question = questions.get(i);
XWPFTableRow row = table.getRow(i);
XWPFTableCell cell = row.getCell(0);
XWPFParagraph paragraph = cell.addParagraph();
XWPFRun run = paragraph.createRun();
run.setText(question.getQuestion());
}
Does a new paragraph create a new empty line?
The table looks like that: