Am working on an application that needs to count words from documents and revisions.
as you can see here, I have already resolved this for Word Documents (well, as much it can be resolved) but now i find myself wondering how to get that data from Excel or PowerPoint documents.
The MSDN Documentation didn't help so far - i will keep looking but if anyone knows the answer i would appreciate a little help.
EDIT: So taking the information provided by @Andrew (Thanks go to him) i got this code for the Excel part:
foreach (Excel._Worksheet s in ExcelBook.Sheets)
{
if (s.UsedRange.Value2 != null)
{
for (int i = 1; i <= s.UsedRange.Value2.GetLength(0); i++)
{
for (int j = 1; j <= s.UsedRange.Value2.GetLength(1); j++)
{
string content = s.UsedRange.Value2[i, j];
MessageBox.Show(i + " - " + j + " - " + content);
}
}
}
}
Now i can use that to count words in all cells in the Sheet, however that still doesn't help with revisions - anyone has an idea on how to follow up on this?