I am creating a table in MS Word the table looks like as shown below .
I then ZIP the file and open the document.xml and check for the border elements in the table grid . this is how it looks . I am checking the for border element that is the top border element.
All the border are displayed as none . Then i check the TableGrid in the styles.xml file for table borders below is how the TableGrid styles look like in the styles.xml
The problem here is i am not able to find where exactly is the border element getting assigned. The top black line in the table ?
Borders can be defined at table level via TableStyle (here w:tblBorders
in TableGrid style) or via tablesProperties
(here w:tblBorders
in w:tblPr
).
If both of them are definied, there is a conflict and borders definied via tablesProperties
will win.
Since the w:tblBorders
in w:tblPr
are set to None
, there is no borders.
But I noticed that TopBorder is missing here (you have Left, Right, Bottom InsideH and InsideV),
It's why, for the TopBorder, MS Word is using the TopBorder
definied in TableGrid style and it is set to Single
.
So, to remove the top border, you have to :
w:tblBorders
in w:tblPr
(and set it to none
like others)None
in the TableGrid style.