I need to export a view to excel. I have already found some code somewhere and it is working great in xpages. Now the user wants to add a summary of totals. I will expla
You are on the right track in your last paragraph but you don't need to store the values in a session scope. A standard javascript object will do. Assuming you are generating your report by looping through the documents in the view, the quickest and easiest solution in my mind would be to count each equipment id as you loop through the documents and store the counts in an object:
equipId[equipId1] equipId[equipId2] . . equipId[equipIdx]
Then after you have looped through all your docs, loop through your equipment ID object values as you have in your sample report above.
Looping through javascript objects: How do I loop through or enumerate a JavaScript object?
Sorting a javascript object: Sorting JavaScript Object by property value