Thank you for your response. Can you please elaborate on how to use custom query 'To remove columns in a table you need to remove the cells (w:tc tag) of the rows (w:tr tag) in the specific position (1, 2...). In this case you need to use a custom XPath query. Can we remove the column after the generation of the table I know the Column Headings for which I need to remove the columns if the whole column contains a certain value like 'NA'.