I am able to achieve Dynamic Table in Word document when there are predefined number of columns in it. But What to know if we can generate Table in which columns are Dynamic based on input.
Any help is appreciated.
Discussion posts and replies are publicly visible
By any chance have you tried the Advanced Document Templating plug-in? I think currently this is the most "officially supported" way of doing what you're asking, assuming that it actually does handle dynamic columns (i've heard it does but haven't tried it myself).
In this link we can find a sample for dynamic column in DocxTableWithoutFieldsMetadataWithVelocity.docx in the docxandvelocity-xxx-sample.zip that you can download or in git.
The basic idea is to use @before-cell/@after-cell :
Hello Gayathri,Able to get your documents from the above given link and the information is really helpful.I have requirement to print dynamic columns and rows.Columns : Name | Role | Dep1 | Dep2..... Depn | DateRows : Lohith Dev Fin Indstry .... Machinery 21-03-2023.Is this the right way to use your code to get this requirement?Please suggest.Thanks in Advance