As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<shortname>Download my custom datalists</shortname> <description>Download all datalists of custom type from repository</description> <url>/downloadDatalist.csv</url> <format default="csv"></format> <authentication>user</authentication> </webscript>
var query,result; var content = new Array(); query = "TYPE:\"{namespace of custom model}custommodel\""; result = search.luceneSearch(query); for each (node in result){ ID = node.properties["cd:ID"]; content.push({"ID":ID}); } model.resultset=result;
"No","Title","Description","Unit","Location" <#list resultset?sort_by(["properties","cm:created"]) as node>"<#if node.properties["cd:ID"]??>${node.properties["cd:ID"]?string}","${node.properties["cm:title"]?string}</#if>","<#if node.properties["cm:description"]??>${node.properties["cm:description"]?string}</#if>","<#if node.properties["cd:unit"]??>${node.properties["cd:unit"]?string}</#if>","<#if node.properties["cd:location"]??>${node.properties["cd:location"]?string}</#if>" </#list>
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
Import Export Data List : Alfresco Datalist Import Export - YouTube