cancel
Showing results for 
Search instead for 
Did you mean: 

exporting data lists into excel

adam_brown
Champ in-the-making
Champ in-the-making
Is it possible to export the contents of a datalist to an excel spreadsheet?
12 REPLIES 12

jriker1
Champ in-the-making
Champ in-the-making
same question here.

mikeh
Star Contributor
Star Contributor
No, this isn't currently possible.

Mike

krups
Champ in-the-making
Champ in-the-making
Hello

I am using alfresco 4.0.d community edition.
I want to export my custom datalist into excel.
Can someone please help me out?

krups
Champ in-the-making
Champ in-the-making
Got it working now.

krups
Champ in-the-making
Champ in-the-making
Hello All,

Finally I have got it done.
I've created web script to export my custom datalists which responses CSV output.
and on button click I called this webscript.
this way I did it and it worked for me.

wfloyd
Champ in-the-making
Champ in-the-making
Would you please share your web script with us?

The Data List Download dashlet allows you to download any Data List from your site in a variety of Spreadsheet formats, including Excel .xls and CSV (Comma Separated Value)

http://addons.alfresco.com/addons/data-list-download


Hello muralidharand
Thank you for your idea,the above link can export all datalists in the specific site,But now I want to export all sites datalists with a  specific datalist at once,So in my opinion,we need to modify the source code within the above link,could you tell how to to that?thanks a lot!

krups
Champ in-the-making
Champ in-the-making
Hi
Sorry I didn't mentioned it before but my aim was to export all datalist of my custom type.
and here is the script.
downloaddatalist.get.desc.xml

<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>
downloaddatalist.get.js

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;
downloaddatalist.get.csv.ftl

"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>

Hope this will help.