Introduction
In my previous article, I already explained how to open Office apps (Word, Excel, and PowerPoint) files and view in an iframe (classic mode).
Here, let us see about using modern web parts, and how we can view the selected document without any customization using File Viewer.
Scenario
Users may not be able to open documents on their client machine. Unfortunately, the default content provides a link which only allows users to download the document and provides a link back to the document file and open in the new tab of the browser window. We must find the downloaded document in a manual fashion.
The requirement is to open the selected document without downloading on a local machine and open it in a new tab of the browser window and this should be achieved using Modern in OOB web parts.
Objective
The below OOB web parts will be used in this solution.
- Document library - Show document library files
- File Viewer - The web part will allow users to view files directly in the page without needing to open the file.
Follow the below steps.
Step 1
Navigate to your SharePoint 2013 site -> Create Modern Page in Site Pages.
Step 2
From this page,
- Edit the page.
- Hover over the canvas where you would like to add layout section.
- Click on the “+” Sign.
- Add New section “Two Column” from the Section layout.

Step 3
You will see two sections to add web parts,

- In the first column-section1,
- Click on the “+” sign.
- Select “Document library” from the web part toolbox.
- Select relative document library; then the below screen appears.




sign on right upper corner of file viewer web part toolbox.



Vivek ShelarPosted Jul 10, 2019, 1:17 PM
Very useful, and common scenario covered with detailed steps.
Andrea LemboPosted Jul 10, 2019, 4:12 AM
Nice article
Vipin TyagiPosted Jul 9, 2019, 6:37 PM
Is there any direct way to open in windows version.
Manoj MittalPosted Jul 9, 2019, 12:07 PM
Interesting. Thanks for sharing