来自 asp.net / vb 的带标题的 doc 文件

发布于 2024-12-23 14:32:45 字数 401 浏览 3 评论 0原文

我想从包含页眉和页脚的 asp.net / vb (dotnet 1.1) 页面创建一个 doc 文件 (MS Word 2003)。 我已成功创建文档,但如何设置页眉和页脚?

还有其他解决办法吗?就像使用模板一样。

编辑:

我使用渲染功能:

   Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)   
     Functionality.RenderToFormat(divSection, "application/msword",
     Functionality.GetPagePathUri(Request), "", "MyDoc.doc")
   End Sub

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.
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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故人的歌 2024-12-30 14:32:45

您看过 DocX 吗?

DocX 是一个 .NET 库,允许开发人员操作 Word 2007
文件,以简单直观的方式。

然而,我认为这不会在 .net 1.1 中工作(如果可能的话,你真的应该升级,因为 1.1 已经在 8 年前发布了!)

Have you seen DocX?

DocX is a .NET library that allows developers to manipulate Word 2007
files, in an easy and intuitive manor.

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!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文