From 411c0dadb552ffd36f59cbb0c051edbf5cc5320e Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 29 Jul 2017 01:58:29 +0100 Subject: [PATCH] Add table demo --- demo/demo4.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 demo/demo4.js diff --git a/demo/demo4.js b/demo/demo4.js new file mode 100644 index 00000000000..44298959407 --- /dev/null +++ b/demo/demo4.js @@ -0,0 +1,12 @@ +const docx = require('../build'); + +var doc = new docx.Document(); + +const table = doc.createTable(4, 4); +table.getCell(2, 2).addContent(new docx.Paragraph('Hello')); + + +var exporter = new docx.LocalPacker(doc); +exporter.pack('My Document'); + +console.log('Document created succesfully at project root!'); \ No newline at end of file