如何使用C#读取办公室文字中的数据,如年龄,姓名,身份证,......? [英] How to read data from office word with C# ,like age,name, id, ...?

查看:78
本文介绍了如何使用C#读取办公室文字中的数据,如年龄,姓名,身份证,......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一项任务来从一个单词中获取数据。在这个词中,这里是这些问题,如身份证,姓名,年龄,性别,学校,班级,专业,例如。

我需要获取这些信息,并将它们存储在数据库中。

我的办公室版本是2007.

我如何获得这些数据来自c#,

的单词doc或如何操作Active X控件那些是用C#的单词doc?

我可以使用aspose.word来读取数据吗?

用C#获取这些数据的任何方法都可以

谢谢

就像这种情况:这里是一个单词的复选框。我想知道它是否被检查过,

a文本框控件,我想知道文本。

I have a task to get the data from a word . In the word, here are these questions, like id, name, age,sex, school, class , major ,eg.
I need to get these information, and store them in the database.
My office version is 2007.
How can i get these data from a word doc with c#,
or how to operate the Active X controls those are in a word doc with C# ?
Can i use aspose.word to read data ?
Any ways to get these data with C# is OK
Thank you
just like this situation: here is a checkbox in a word. I want to know if it was checked,
a textbox control ,I want to konw the text.

推荐答案

请看我过去的答案: 如何从MS Visual Studio 2010中的添加参考添加microsoft excel 15.0对象库 [ ^ ]。



请不要注意原始问题的主题,请阅读本文中的其他答案参考。



- SA
Please see my past answer: How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010[^].

Please don't pay attention for the topic of the original question, read my other answers references in this one.

—SA


首先, Word文档不是数据库! 即使有一些有用的信息,比如姓名,年龄,性别等没有办法阅读它们,除非它们存储在:书签,字段,表格,自定义属性。



如何:读取和写入文档属性 [ ^ ]

如何:以编程方式更新书签文本 [ ^ ]

自动化数据插入和提取的Word表格 [ ^ ]

Field.Data属性 [ ^ ]
First of all, Word document is not a database! Even if there are some useful information, like Name, age, sex, etc. there is no way to read them, unless they are stored in: bookmarks, fields, tables, custom properties.

How to: Read from and Write to Document Properties[^]
How to: Programmatically Update Bookmark Text[^]
Automating Word Tables for Data Insertion and Extraction[^]
Field.Data Property [^]


这篇关于如何使用C#读取办公室文字中的数据,如年龄,姓名,身份证,......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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