OpenXML读写word的例子

本文提供了一个C#操作OpenXML来读写Word文档的实际例子,包括prprogram.cs文件的介绍,ReportType类的设计以及效果测试的说明。通过这个例子,读者可以学习如何在程序中创建和修改Word文档。
摘要由CSDN通过智能技术生成
  • 用程序操作Word文档,这是一个例子


1,prprogram.cs


 List<ReportType> reportTypeList = new List<ReportType>();

            PageHeadersOrFooters pageHeaders = new PageHeadersOrFooters();
            pageHeaders.Add(new ReportText("页眉右") { Aligment = 1 });
            pageHeaders.ExcludeFirstPage = true;
            ReportType.PageHeaders = pageHeaders;


            PageHeadersOrFooters pageFooters = new PageHeadersOrFooters();
            pageFooters.Add(new ReportText("页脚左") { Aligment = -1 });
            pageFooters.HavePageNum = true;
            ReportType.PageFooters = pageFooters;

            ReportText reportText = new ReportText(true, "Report"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

暖洋洋的好日子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值