Building Table in DOCX with Dynamic Columns

I have a task to create a Dynamic DOCX document with table in it. I have created one with number of rows increasing, but my requirement need me to make a table with dynamic column as well. Has anybody worked on such thing before. If yes please let me know how?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Yes I have created a dynamic DOCX in which rows are adding dynamically as per the list i pass in XML. But can i increase the columns based on something, because as per my knowledge we have to pass a template to create a DOCX file in which beforehand i have to provide the columns. Please find below screenshot of the template. Here I have fixed Name, Last Name and Mail. Suppose I want to add one more column "dynamically" like Phone Number. Can that be done?