如何提取包含Excel单词列表文件中每个单词的句子 [英] how to extract sentences containing every word in the Excel word list file

查看:557
本文介绍了如何提取包含Excel单词列表文件中每个单词的句子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ms的word文档文件(2007年)另存为document.doc,还有一个excel文件中保存了word_list.xls.

如果在document.doc文件和r1c1的excel文件中有诸如我的名字是mayank"之类的句子,我会写"My",因此我希望将所有包含"My"的句子复制到新的excel文件中(extract.xls)在r1c1中.

请帮帮我.
谢谢

I have a one ms word document files(2007) save as document.doc and one excel file save a word_list.xls.

If there is any sentence like example "My name is mayank" in document.doc file and in excel file in r1c1 i write "My", so I want all the sentence containing "My" copied in new excel file (extract.xls) in r1c1.

Please help me.
Thanks

推荐答案

您可以使用Interop从Word文档中找到所有句子,请参见:http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.sentences.aspx [ ^ ]

一种可能性是循环所有返回的范围并搜索特定单词以创建包含所需单词的句子列表.
You can find all sentences from a Word document using Interop, see: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.sentences.aspx[^]

One possibility is to loop all the returned ranges and search for specific words to create the list of sentences containing the desired word(s).


这篇关于如何提取包含Excel单词列表文件中每个单词的句子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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