小编hos*_*avi的帖子

如何使用 openxml.wordprocessing 设置“表格方向”

我正在努力创建具有从右到左表格的新文档。如何将表格方向设置为 RTL?

我尝试了以下代码,但它不起作用:

             Table tb = new Table(new TableLayout() { Type = TableLayoutValues.Autofit });
            tb.Append( new TableProperties(new TextDirection() { Val=TextDirectionValues.TopToBottomRightToLeft}, new RightToLeftText() { Val =new DocumentFormat.OpenXml.OnOffValue(true) }, new TableBorders(new TopBorder { Val = new DocumentFormat.OpenXml.EnumValue<BorderValues>(BorderValues.BasicThinLines), Size = 5 }, new BottomBorder { Val = new DocumentFormat.OpenXml.EnumValue<BorderValues>(BorderValues.BasicThinLines), Size = 5 }, new LeftBorder { Val = new DocumentFormat.OpenXml.EnumValue<BorderValues>(BorderValues.BasicThinLines), Size = 5 }, new RightBorder { Val = new DocumentFormat.OpenXml.EnumValue<BorderValues>(BorderValues.BasicThinLines), Size = 5 }, new InsideHorizontalBorder { Val = new DocumentFormat.OpenXml.EnumValue<BorderValues>(BorderValues.BasicThinLines), Size …
Run Code Online (Sandbox Code Playgroud)

c# openxml

2
推荐指数
1
解决办法
490
查看次数

标签 统计

c# ×1

openxml ×1