dolanmiu / docx

Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

Home Page:https://docx.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

patchDocument - input.prepForXml Error

Blair-24 opened this issue · comments

Just wondering if its a limitation or I'm doing something wrong. Trying to patch an existing document with an array of objects that I want to format into ultimately repeating sections for each object. This is my code at present (plan is to add more, e.g. tables etc):

image

But I get this error:

TypeError: Cannot read properties of undefined (reading 'prepForXml')

I've built out a bit more of the code to show where I'm heading. This is the item I'm returning to the children item within the patchDocument:

image

But still get the same error.