Expand my Community achievements bar.

SOLVED

create aem pages, templates ,tags by reading from Excel

Avatar

Level 2

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

prathyusha21_0-1672654461378.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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/ad... 



Arun Patidar

View solution in original post

4 Replies

Avatar

Level 2

Thanks for the reply .

but i want the code 

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

 

Avatar

Correct answer by
Community Advisor

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/ad... 



Arun Patidar

Avatar

Community Advisor

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