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. | Community
Skip to main content
October 16, 2015
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.

  • October 16, 2015
  • 4 replies
  • 2220 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

4 replies

smacdonald2008
Level 10
October 16, 2015

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.


 

smacdonald2008
Level 10
October 16, 2015

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

October 16, 2015

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

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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