I can't manage to make csv-table generate self-fixed column widths.
After analysis, I could see that both options "width" and "widths" had to be set, but even then it was not enough, at least for the Word version I used (office 365).
It seems due the fact that w:tblLayout is not specified even if table is detected as is_fixed_width.
EDIT: 1 year later update ==> the problem was also due to my pipeline which was reopening Word document via win32com. In this case Word automatically resize the document.
So as stated, if you want to make sure your docx won't lose table sizes (if you set them as fixed at the beginning), then in docx.py, you should add to the property_tree (function make_table) a property [['w:tblLayout', {'w:type': 'fixed'}]]
I can't manage to make csv-table generate self-fixed column widths.
After analysis, I could see that both options "width" and "widths" had to be set, but even then it was not enough, at least for the Word version I used (office 365).
It seems due the fact that
w:tblLayoutis not specified even if table is detected asis_fixed_width.EDIT: 1 year later update ==> the problem was also due to my pipeline which was reopening Word document via win32com. In this case Word automatically resize the document.
So as stated, if you want to make sure your docx won't lose table sizes (if you set them as fixed at the beginning), then in docx.py, you should add to the
property_tree(functionmake_table) a property[['w:tblLayout', {'w:type': 'fixed'}]]