小编Ben*_* V.的帖子

打开 XML 更改表格的字体大小

for (var i = 0; i <= data.GetUpperBound(0); i++)
{
    var tr = new DocumentFormat.OpenXml.Wordprocessing.TableRow();
    for (var j = 0; j <= data.GetUpperBound(1); j++)
    {
        var tc = new DocumentFormat.OpenXml.Wordprocessing.TableCell();

        tc.Append(new DocumentFormat.OpenXml.Wordprocessing.Paragraph(new DocumentFormat.OpenXml.Wordprocessing.Run(new DocumentFormat.OpenXml.Wordprocessing.Text(data[i, j]))));


        tr.Append(tc);

    }
    table.Append(tr);
}
Run Code Online (Sandbox Code Playgroud)

我想更改表格单元格中的字体大小。你能帮我解决这个问题吗?我不知道为什么他们没有为单元格字体大小添加属性。

c# openxml-sdk

3
推荐指数
1
解决办法
7293
查看次数

标签 统计

c# ×1

openxml-sdk ×1