docx
docx copied to clipboard
improperly merge tablecell if use rowSpan on the starting columns
Thank you for your work! Recently, I encount a bug.
return new Table({
rows: [
new TableRow({
children: [
new TableCell({ children: [new Paragraph('2,1')], columnSpan: 1, rowSpan: 2 }),
new TableCell({ children: [new Paragraph('2,1')], columnSpan: 1, rowSpan: 2 }),
new TableCell({ children: [new Paragraph('1,4')], columnSpan: 4, rowSpan: 1 }),
],
}),
new TableRow({
children: [
new TableCell({ children: [new Paragraph('1,1')], columnSpan: 1, rowSpan: 1 }),
new TableCell({ children: [new Paragraph('1,1')], columnSpan: 1, rowSpan: 1 }),
new TableCell({ children: [new Paragraph('1,1')], columnSpan: 1, rowSpan: 1 }),
new TableCell({ children: [new Paragraph('1,1')], columnSpan: 1, rowSpan: 1 }),
],
}),
],
});
if I use above code to create table, I get the following table:
But if I put columnSpan cell before, I get a merge properly table:
return new Table({
rows: [
new TableRow({
children: [
new TableCell({ children: [new Paragraph('1,4')], columnSpan: 4, rowSpan: 1 }),
new TableCell({ children: [new Paragraph('2,1')], columnSpan: 1, rowSpan: 2 }),
new TableCell({ children: [new Paragraph('2,1')], columnSpan: 1, rowSpan: 2 }),
],
}),
......
});
Version: 5.4.1
@dolanmiu any chance you may take a look at this problem? I am encoutering it as well.
i put a columnspan cell before, but it's also improperly merge
@hzlu are you solved it ?
Has the problem been solved?