您可以使用 Aspose.Words 调整单元格内容左侧、右侧、下方或上方的空间量(以磅为单位)。请尝试使用以下代码:
Document doc = new Document(MyDir + @"input.docx");
Table tab = doc.FirstSection.Body.Tables[0];
tab.BottomPadding = 0;
tab.LeftPadding = 0;
tab.RightPadding = 0;
tab.TopPadding = 0;
doc.Save(MyDir + @"17.7.docx");
希望这可以帮助。
我与 Aspose 合作,担任开发人员布道者。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句