Application of ColumnWidths #1267
gjblajian
started this conversation in
Ideas / Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@dolanmiu I just want to point out that, in my experience, attempting to apply columnWidths to a Table did not work at all until I added {layout: TableLayoutType.FIXED} to the table as well. There is some discussion about this here: #411 but the issue is not resolved without the layout property being set as I discovered here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b3ddc1f3-1bce-47fc-b5a7-b92f56c1490e/table-width-with-percents?forum=oxmlsdk. I could see that the TblGrid > gridCol.w value was set in the document.xml but word simply would not properly set the width until I added the layout property. I also want to stress that the units are TWIPs. demo 32 "sort of" indicates this but there is very little documentation to show this. It may be useful to add some additional documentation about these issues here: https://docx.js.org/api/interfaces/ITableOptions.html#columnWidths.
I do not believe this is a bug in docx.js but rather a rather irksome quirky behavior in Word [in my case Word Version 2109 (Build 14430.20306 Click-to-Run)], thus the reason I did not open an issue for this.
In a documentation related aside it may be useful to add some additional commentary to the documentation on indent vs margin as applied to tables as well. It is unclear how margin-left differs from indent.
Beta Was this translation helpful? Give feedback.
All reactions