create aem pages, templates ,tags by reading from Excel | Community
Skip to main content
Level 2
Jan 2, 2023 10:15 AM UTC
Solved

create aem pages, templates ,tags by reading from Excel

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.
arunpatidar
arunpatidarAccepted solution
New Participant
Jan 2, 2023 4:11 PM UTC

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

4 replies

ShaileshBassi
New Participant
Jan 4, 2023 3:05 PM UTC

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

Translate
arunpatidar
New Participant
Jan 2, 2023 10:20 AM UTC
Level 2
Jan 2, 2023 10:38 AM UTC

Thanks for the reply .

but i want the code 

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

 

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Jan 2, 2023 4:11 PM UTC

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 

Translate
Arun Patidar