create aem pages, templates ,tags by reading from Excel | Community
Skip to main content
Level 2
January 2, 2023
Solved

create aem pages, templates ,tags by reading from Excel

  • January 2, 2023
  • 2 replies
  • 1124 views

i need code for creating pages templates tags by reading from excel 

please help me with code and clear explanation 

excell should be like this

 

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 arunpatidar

I don't think, so anybody is going to share there internal project code or if they have the same requirements.

You can get the code from github for the above features that I have shared for reference.

https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/mcp/impl/processes/DataImporterFactory.java 

2 replies

arunpatidar
Community Advisor
Community Advisor
January 2, 2023
Level 2
January 2, 2023

Thanks for the reply .

but i want the code 

creating pages with diff differnt templats , and tags by reading the excel 

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
January 2, 2023

I don't think, so anybody is going to share there internal project code or if they have the same requirements.

You can get the code from github for the above features that I have shared for reference.

https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/mcp/impl/processes/DataImporterFactory.java 

Arun Patidar
ShaileshBassi
Community Advisor
Community Advisor
January 4, 2023

Hi @aem1234567890 

You can use the below create the logic using the APIs available for reading the excel.

one of the way is to use read the excel file using these, where you get the value of the each cell 

org.apache.poi.ss.usermodel.Cell;
org.apache.poi.ss.usermodel.Row;
org.apache.poi.ss.usermodel.Sheet;
org.apache.poi.ss.usermodel.Workbook;
org.apache.poi.ss.usermodel.WorkbookFactory;

once you get each cell value you can leverage it and pass to the PageManager method 

pageManager.create(<complete-path>,<page-name>,<template-name> StringUtils.EMPTY);

Hope this helps!

Thanks