Preview Microsoft Office files like PPT, DOC, excel on web page | Community
Skip to main content
Level 2
October 25, 2023

Preview Microsoft Office files like PPT, DOC, excel on web page

  • October 25, 2023
  • 3 replies
  • 1812 views

We have a requirement to preview the Microsoft Office files(ppt, doc, excel files stored in AEM DAM) on a web page.

1. Preview should be a pop-up when clicked on a preview button. It should display the desired format file on popup.

 

2. The other part of this requirement is to provide an option on the pop-up itself to search for a keyword within the previewed file.

The searched result should contain the slides/page number with the number of times that keyword(highlighted in any color when the slide/page containing the keyword is opened) appeared on the slide/page. 

Pop-up on the left side can have a search box, and below to search box can show the search results. While on the right side, it previews the file.

 

Could you please share the best practice for implementing such functionality or suggest a feasible approach or any built-in library available?

 

Note: since the MS files are located in AEM DAM, Google Doc Viewer/ MS Office Online would not be a fit solution.

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

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 25, 2023

Hi, 

 

I don't think there is anything ootb in AEM to render such documents, however, you can rely on Google Docs viewers, please check this example: https://jsfiddle.net/7xr419yb/.

https://stackoverflow.com/questions/9418850/how-to-display-a-word-document-using-fancybox 

Esteban Bustamante
AshishPaAuthor
Level 2
October 26, 2023

Hi, thanks for your reply.

Since the MS files are located in AEM DAM, Google Doc Viewer would not be a fit solution.

Gaurav_Sachdeva_
Level 3
October 25, 2023

Hi @ashishpa 

 

To create a preview option, you have to create a custom modal window component that display the asset.. In the same component you can add the search functionality.

For search functionality inside assets please refer https://www.argildx.us/technology/fulltext-search-in-aem-pages-assets-custom-search-pdf-excel-and-powerpoint/

 

Thanks

 

AshishPaAuthor
Level 2
October 26, 2023

Hi @gaurav_sachdeva_ , thanks for your reply.

Could you please confirm if this search is only specific to the single file?

The expectation is that the search is done within a file, not in its sibling files under the same parent folder. 

Gaurav_Sachdeva_
Level 3
October 26, 2023

Hi @ashishpa I believe if you give exact path to the specific asset such as pdf and do full text search than you get results from that asset only.

kautuk_sahni
Community Manager
Community Manager
October 26, 2023

@ashishpa Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
AshishPaAuthor
Level 2
November 9, 2023

I am still expecting some good suggestions for point 1 in above problem statement.