Dynamically columns generation into word document

I have a grid with dynamic column names and static columns.

Ex : 

Here EmpSub's will varies on each instance.Need the word document format to get the dynamic columns syntax in word document.

Able to get the rows data from the CreateDictinoary function but need the exact format to write in the word document.

Thanks in Advance.

  Discussion posts and replies are publicly visible