Thank you for your help.
I am not sure why they want it, I am an admin, and I was asked by the teachers several times that they need excel file with names/ID of the students who submit a particular assignment.
course Administration>Reports>Course Participation>select the activity, role, action and the group
you will have list of students who viewed/post a certain activity.
and you can send messages to the selected users.