I want to generate a table inside a word doc, below is the config of the smart service "Text Doc from Template":
My Template Doc is here - name.docxResult doc is throwing below error : The input is :
Discussion posts and replies are publicly visible
You can do lots of tricks with the regular Word from Template smart service using the "WordML injection" trick, but you must understand what you're doing first or else the resulting word document will most certainly break and refuse to open. As Mathieu already mentioned, if you're just trying to create advanced formatting it's probably easier to just learn and use the Advanced Document Templating plug-in.
If you need to proceed with the current technique of using WordML injection - you need to know how to open and analyze the document.xml file at the heart of any generated .docx file (which is really just a zip file containing a predictable file structure and different elements). You should also understand how replacement keys work - judging by your top screenshot and how the first replacement key has several WordML keywords visibile in it, I'm guessing you haven't sanitized your base template yet to be able to cleanly accept wordML injection. The hint I'll give here is that every replacement key should show up on the Appian side as plaintext, with no WordML markup visible, otherwise there was a problem. You probably shouldn't be editing these in Word itself (since it loves to jam random irrelevant extra formatting into the cracks with every edit you make), but directly in the XML file of your template document, to prevent clutter from creeping in.
Additionally I can see the code you're trying to insert isn't WordML but appears to be regular HTML. Word will have no idea how to handle this. There are online resources with WordML reference guides which will show you how to guild tables by hand in WordML - or you can do what I did for starters and save a very simple table in a word file, then open the underlying XML file in a text powereditor, and see the structure for yourself (warning, they make no attempt to format it for friendly reading).