首页 新闻 会员 周边

C#导出word时插入表格让他不换行

0
[已关闭问题] 关闭于 2015-08-07 13:48

我插入表格的代码试这样的
table = myWordApplication.ActiveDocument.Tables.Add(myWordApplication.Selection.Range, 1, 1, ref missing, ref missing);

        table.Cell(1, 1).Range.Text = str;

        table.Columns.Width = ColumsWidth;
        table.Range.Font.Size = 9F;
        table.Rows.Height = 24F;
        table.Rows.HeightRule = WdRowHeightRule.wdRowHeightExactly;

        table.Rows.Application.Selection.ParagraphFormat.LineSpacing = 10f;
        table.Rows.Application.Selection.ParagraphFormat.LineSpacingRule = WdLineSpacing.wdLineSpaceExactly;

        object objCount = 2;
        MoveDown(4);

                    这样在插入表格的时候表格会换行,怎么让他在插入表格的时候不换行啊!
                    求大神指教一下
年少轻狂、的主页 年少轻狂、 | 初学一级 | 园豆:184
提问于:2015-06-27 15:17
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册