在asp.net中填写Word文档 [英] Filling a Word document in asp.net

查看:98
本文介绍了在asp.net中填写Word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学者并且想知道any1可以帮助我编写一个可以用来填写word文档中缺少的细节的应用程序。

我正在为我的公司和所有人制作手册这本手册的格式相同,只是序列号,参考号和其他一些文本字符等一些细节被更改,我想将它自动化为一个pian,以便始终纠正文档的格式。

可以在我可以获取基本单词文件并在.net应用程序中编辑它的应用程序,这样我将不遗余力地纠正我创建的每个文件的格式。

解决方案

ASP.NET中的Microsoft Word文档 [ ^ ]



查看有关模板的部分和书签,这正是你所需要的。


在我的一个项目中,我有同样的要求。我创建了一个包含所有静态内容的基础文档。需要动态更改的内容写在<<<<和>>标签。例如<< name>>将在运行时替换为实际名称。为此,我使用C#查找和替换单词的功能。只需谷歌MS Word使用C#查找和替换功能。那里有很多文章。一个很好的例子是: http://www.wwco.com/~wls/blog/2010/07/03/find-and-replace-in-word-using-c-net/ [ ^

I am new to coading and wondering of any1 can help me with writing an application which can be used to fill the missing details in a word document.
I am making manuals for my company and all this manuals have the same format except that some deatils like serial numbers, and reference number and some other text fiels are changed, i want to automate it as its a pian to correct formatting of the document all the time.
can an application be made where i can take the base word file and edit it in .net application in that way i will be spared the word of correcting the format of each file i create.

解决方案

Microsoft Word Documents from ASP.NET[^]

Look at the section regarding templates and bookmarks, this is exactly what you need.


In one of my project I had the same requirement. I created a base document with all the static content. The content that needed to be changed dynamically was written within << and >> tags. For example <<name>> would be replaced with actual name at runtime. For this I used word's find and replace function using C#. Just google "MS Word's find and replace functionality using C#". There are plenty of articles out there. One good example is this: http://www.wwco.com/~wls/blog/2010/07/03/find-and-replace-in-word-using-c-net/[^]


这篇关于在asp.net中填写Word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆