I have a word document with a huge two columns table, the first column contains a code, and the second one contains a word. In many rows the word of the second column is repeated so I need to locate all rows with repeated words. I'm using findAll() method and getting the index for every occurence of the word but I can't get the table row from that index. Below is the code I'm using.
using (DocX doc = DocX.Load(path/to/file.docx)){
Table table = doc.Tables[0];
var ocurrences = doc.FindAll("text", RegexOptions.IgnoreCase);
}
You can LinQ for getting repetitive rows as:
Note :- here
Word
is the second column