Fix demos

This commit is contained in:
Dolan
2019-06-17 01:54:48 +01:00
parent 7bc00926eb
commit 427dc86915
2 changed files with 35 additions and 26 deletions

View File

@ -10,38 +10,38 @@ const table = doc.createTable({
columns: 6,
});
let row = 0;
table.getCell(row, 0).addContent(new Paragraph("0,0"));
table.getCell(row, 1).addContent(new Paragraph("0,1"));
table.getCell(row, 3).addContent(new Paragraph("0,3"));
table.getCell(row, 4).addContent(new Paragraph("0,4"));
table.getCell(row, 0).addParagraph(new Paragraph("0,0"));
table.getCell(row, 1).addParagraph(new Paragraph("0,1"));
table.getCell(row, 3).addParagraph(new Paragraph("0,3"));
table.getCell(row, 4).addParagraph(new Paragraph("0,4"));
table.getRow(row).mergeCells(4, 5);
table.getRow(row).mergeCells(1, 2);
row = 1;
table.getCell(row, 0).addContent(new Paragraph("1,0"));
table.getCell(row, 2).addContent(new Paragraph("1,2"));
table.getCell(row, 4).addContent(new Paragraph("1,4"));
table.getCell(row, 0).addParagraph(new Paragraph("1,0"));
table.getCell(row, 2).addParagraph(new Paragraph("1,2"));
table.getCell(row, 4).addParagraph(new Paragraph("1,4"));
table.getRow(row).mergeCells(4, 5);
table.getRow(row).mergeCells(2, 3);
table.getRow(row).mergeCells(0, 1);
row = 2;
table.getCell(row, 0).addContent(new Paragraph("2,0"));
table.getCell(row, 1).addContent(new Paragraph("2,1"));
table.getCell(row, 2).addContent(new Paragraph("2,2"));
table.getCell(row, 3).addContent(new Paragraph("2,3"));
table.getCell(row, 4).addContent(new Paragraph("2,4"));
table.getCell(row, 0).addParagraph(new Paragraph("2,0"));
table.getCell(row, 1).addParagraph(new Paragraph("2,1"));
table.getCell(row, 2).addParagraph(new Paragraph("2,2"));
table.getCell(row, 3).addParagraph(new Paragraph("2,3"));
table.getCell(row, 4).addParagraph(new Paragraph("2,4"));
table.getRow(row).mergeCells(4, 5);
table.getRow(row).mergeCells(1, 2);
row = 3;
table.getCell(row, 0).addContent(new Paragraph("3,0"));
table.getCell(row, 1).addContent(new Paragraph("3,1"));
table.getCell(row, 2).addContent(new Paragraph("3,2"));
table.getCell(row, 3).addContent(new Paragraph("3,3"));
table.getCell(row, 4).addContent(new Paragraph("3,4"));
table.getCell(row, 5).addContent(new Paragraph("3,5"));
table.getCell(row, 0).addParagraph(new Paragraph("3,0"));
table.getCell(row, 1).addParagraph(new Paragraph("3,1"));
table.getCell(row, 2).addParagraph(new Paragraph("3,2"));
table.getCell(row, 3).addParagraph(new Paragraph("3,3"));
table.getCell(row, 4).addParagraph(new Paragraph("3,4"));
table.getCell(row, 5).addParagraph(new Paragraph("3,5"));
row = 4;
table.getCell(row, 0).addContent(new Paragraph("4,0"));
table.getCell(row, 5).addContent(new Paragraph("4,5"));
table.getCell(row, 0).addParagraph(new Paragraph("4,0"));
table.getCell(row, 5).addParagraph(new Paragraph("4,5"));
table.getRow(row).mergeCells(0, 4);
const packer = new Packer();