I have some category in view, please do follow down.
1)Category1
2) Sub-Category1
3)Sub-Category 1-1
doc1 6
doc2 7
1)Category2
2) Sub-Category2
3)Sub-Category 2-2
doc1 6
doc2 8
As per defined above i want take the handle the category1 and subcategory1 and will take handle down the line to the sub category 1-1. and want the sum of underline documents like 6 and 7 , then it would insert into excel.
and repeat the process until and unless the documents get end.
You could build a NotesDocumentCollection for each Category/Subcategory by using the GetAllDocumentsByKey method and passing an array of Category and SubCategory
Once you have the NotesDocumentCollection, you can loop through each NotesDocument, get the field value and build up a total.