Expand my Community achievements bar.

SOLVED

Can we export the excel sheet to cq and the read the header of the file and create the node with the header name and read the each row of the file.

Avatar

Former Community Member

Can we export the excel sheet to cq and the read the header of the file and create the node with the header name and read the each row of the file.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Its posted and works like a charm -- i can upload an excel file to CQ, it reads the data, extracts the data and persists the data in the JCR. So if you had a lot of data in an Excel spreadsheet (like many organizations do) -- this custom Excel service can read the spreadsheet and dump the data into the JCR. Check out the new step by step article. It produces this web app that lets you upload an excel file to CQ:

[img]pic.png[/img]

Then the service extracts the data and persists in the JCR:

[img]cust.png[/img]

 

See: http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-custom-excel-service-for-adobe.html

View solution in original post

4 Replies

Avatar

Level 10

For this use case -- you can create a custom CQ service -- that is one of the powerful features of CQ - the ability to create custom server-side services. I would start by getting this API into CQ so you can manipulate Excel spreadsheets:

1 - http://jexcelapi.sourceforge.net/ (Wrap this API into an OSGi bundle -- you can see an example of wrapping a simple JSON API into a OSGi here: http://scottsdigitalcommunity.blogspot.ca/2013/06/posting-form-data-to-adobe-cq-using.html)

Then in your use case-- you most likely want to upload the excel file to CQ:
2 - http://scottsdigitalcommunity.blogspot.ca/2013/07/uploading-files-to-adobe-experience.html

3 - To lean how to create a custom service in CQ that can modify the JCR -- see this community article:

http://scottsdigitalcommunity.blogspot.ca/2013/01/persisting-cq-data-in-java-content.html

Hope this helps - happy coding.


 

Avatar

Level 10

An update on this thread - a new community article is being developed based on this use case. I have successfully created a custom AEM service using the jexcelapi API. This service reads data from a spreadsheet and updates the AEM JCR with excel data. Here is the link to the article. It will be published early Sept 2013:

http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-custom-excel-service-for-adobe.html

Avatar

Former Community Member

Thanks a lot.I dont forget to check for the development article.

Avatar

Correct answer by
Level 10

Its posted and works like a charm -- i can upload an excel file to CQ, it reads the data, extracts the data and persists the data in the JCR. So if you had a lot of data in an Excel spreadsheet (like many organizations do) -- this custom Excel service can read the spreadsheet and dump the data into the JCR. Check out the new step by step article. It produces this web app that lets you upload an excel file to CQ:

[img]pic.png[/img]

Then the service extracts the data and persists in the JCR:

[img]cust.png[/img]

 

See: http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-custom-excel-service-for-adobe.html