以编程方式读取.doc文件并填写表格TextBox c# [英] Programmatically Read .doc file and fill form TextBox c#

查看:78
本文介绍了以编程方式读取.doc文件并填写表格TextBox c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的文档文件
data.doc

名称:xxxxx
班:第12名
地址:xyzz,zzzz-121212


并上传此data.doc文件并自动填写我的表单

名称:| xxxxx |此文本框

类别:| 12th |

地址:| xyzz,zzzz-121212 |

this my document File
data.doc

Name: xxxxx
class: 12th
Address: xyzz,zzzz-121212


and upload this data.doc file and Fill My form automatically

Name: |xxxxx | this Text Box

class: |12th|

Address: |xyzz,zzzz-121212|

推荐答案

如上所述,您可以使用Office interop读取word文档.您可以按自己喜欢的任何方式进行解析.核心问题是,为什么要使用word docs来执行此操作?
As has been said, you can read a word doc using Office interop. You can parse it any way you like. The core question is, why would you use word docs to do this ?


如果您想将.doc文件读入文本框,则需要转换.rtf格式,并且可以将文件显示为文本框
If u want to read .doc files into textboxes , u need to convert .rtf format and u can display file into textboxes


这篇关于以编程方式读取.doc文件并填写表格TextBox c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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