Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
打开包含表格的 Word (2007/2010) 文档,选择表格并右键单击,选择 AutoFit-->AutoFit to Window
如何使用 OpenXML SDK 2.5 在 C# 中实现此操作?
您可以将表格的宽度设置为页面的 100%,或 5000 百分之五十。
Table table = ... TableWidth width = table.GetDescendents<TableWidth>().First(); width.Width = "5000"; width.Type = TableWidthUnitValues.Pct;