There is one generic example using which you can export any kind of data in excel.Below link will help you understanding that stuff.
Alfresco Webscript : Export Data In Excel | Krutik Jayswal
You can use this addon that offers this functionality.
GitHub - deas/contentreich-alfresco-datalists: Datalist Extensions for Alfresco Share
Retrieving data ...