autofit is broken
See original GitHub issueHi, the autofit method is broken in 0.8.5. Tables behave like if the columns have fixed width.
When autofit is set, tag(s) <w:tcW/> for the table(s) in document.xml should be set to something like <w:tcW w:type="auto" w:w="0"/> and not <w:tcW w:type="dxa" w:w="13606"/> (for example)
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
You cannot use the AutoFit feature for rows or columns that ...
In Excel, you cannot use the AutoFit feature on a column that contains a cell merged with cells in other columns. Likewise, you...
Read more >row autofit not working
This problem occurs if you have manually modified the height of the row. ... To adjust the height of the row to fit...
Read more >[Fixed] AutoFit Row Height Not Working for Merged Cells in ...
But if your Excel worksheet contains any merged cell, then the AutoFit Row Height and the AutoFit Column Width will not work there....
Read more >AutoFit Row Height and Column Width not working : r/excel
I'm at a loss! The AutoFit Row Height and AutoFit Column Width features in excel are not working for me. When I attempt...
Read more >Resizing object with 'Auto-Fit' enabled now broken in 15.1
In version 15.0.3 and earlier, if you enabled the 'Auto-Fit' option and then resized an object by entering values in the Width or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Here is a snippet to the autofit works. It load every tables and set tblW and cells width to type auto.
Any idea how to implement it to the library core library? Adding a tblW children to tblPr and update the autofit setter?
The cells in a column can be set to have
w:type="auto"using this code:If you’re willing to depend on the
w:tcPrandw:tcWelements already being there, it can be shortened to:If someone has a proposal for when that should be done automatically, I’m willing to consider it, just clearly state the behavior you propose.