[英]doc file from asp.net / vb with header
I would like to create a doc file (MS Word 2003) from a page asp.net / vb (dotnet 1.1) that contains a header and footer. 我想从包含页眉和页脚的页面asp.net / vb(dotnet 1.1)创建一个doc文件(MS Word 2003)。 I have managed to create the doc but how to set a header and a footer? 我已经成功创建了文档,但是如何设置页眉和页脚?
Is there any other solution? 还有其他解决方案吗? Like using template. 喜欢使用模板。
edit: 编辑:
I user the Render function: 我使用了渲染功能:
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
Functionality.RenderToFormat(divSection, "application/msword",
Functionality.GetPagePathUri(Request), "", "MyDoc.doc")
End Sub
Have you seen DocX ? 您看过DocX吗?
DocX is a .NET library that allows developers to manipulate Word 2007 files, in an easy and intuitive manor. DocX是一个.NET库,允许开发人员以简单直观的方式操作Word 2007文件。
However I don't think this is going to work in .net 1.1 (you really should upgrade if possible as 1.1 was released 8 years ago!) 但是,我认为这在.net 1.1中不起作用(如果可能的话,您真的应该升级,因为1.1是8年前发布的!)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.