The File Viewer Web Part: Get the most out of the Modern Out of the Box Web Parts Series

The file viewer web part is a new web part that was introduced with the modern experiences in SharePoint. The web part will allow for users to view files directly in the page without needing to open the file.

Functionality:

  • Soon to support up to 270 file types
  • Option to specify the page to start viewing on
  • Additional menu options:
    • Download a copy of the file
    • Print the file to a PDF
    • Accessibility Mode
    • Embed Information – provides embed code in an iframe with a link to the document
    • Provide feedback to Microsoft
    • Terms of use (Microsoft)
    • Privacy and Cookies (Microsoft)
  • Full screen expand
  • Description
  • Scroll through of the document in the window

File types currently supported:

  • Word
  • PDF
  • Powerpoint
  • Excel
    • Entire Workbook
    • Chart
    • Table
    • Range
    • Show Gridlines
    • Show row and column headings
    • Allow sorting and filtering

How to Use:

Select the “File Viewer” web part from the web part tool box.

Select the “Add Document” button.

Choose the file that you would like to add.

Your file will now show in the viewer window. Depending on the file type chosen, different options will be available for viewing the content.

Add a description to the document to allow users to understand the content the document may present.

To view options that are specific to that document, click the web part properties edit icon to the left of the web part. It is a pencil icon.

If an excel document was selected, the user will be able to select from the following options for presenting the content:

  • Entire Workbook
  • Chart
  • Table
  • Range
  • Show Gridlines
  • Show row and column headings
  • Allow sorting and filtering

If a Word or PDF Document is selected, the user may select the page in the document to start the presentation.

For Word Documents, an additional menu allows for options for downloading, viewing and embedding of the document.

Recommendations for use:

Being able to present content on a page without needed to have an additional link to the document, i.e. Procedures, directions or a presentation tied to a news article.

Determine if the file viewer should be used in a full-width or 2/3 width canvas. Placing this web part in a small 1/3 column would not easily allow for content to be consumed by the user.

Join the Conversation

  1. Neat web part. I wish we were able to make the window large enough to show a full Word page without having to scroll. Does anyone know how to edit the size of the window?

    1. D'arce Hess Author says:

      The closest that you will be able to get is by placing the web part in a single column layout.

  2. Do you know if there is a way to hide the menu in the lower right corner?

    1. D'arce Hess Author says:

      It depends on the type of document that you added, if the menu will show, but overall, no, there isn’t a way to hide or remove it. The goal is to be able to have a user interact with the file and the content within the web part. Out of curiosity, why are you looking to hide it?

  3. Dinesh Kumar says:

    Great Post!.

    I wonder where these uploaded files through file viewer web part are saved! I mean which library these files are saved? Please advise.

    1. D'arce Hess Author says:

      If you have not created a custom library, files would automatically be stored in the default “Documents” library on the site.

      1. Hey D’arce Hess, Do You know How is it possible to change the storing destination? I want to prevent automatic storage to Documents library. I even created a custom library (which I also called “Documents”, however the files are still being uploaded to the new library! Is it possible to change it to being uploaded just to site assets library?

        1. D'arce Hess Author says:

          I am not sure what you are asking. Ideally, you should always create the document and upload it to your preferred library first then use the file viewer web part to display it on a page.

  4. should I be able to edit excel documents when displayed in the file viewer web part? I have a simple calculator but it i can adjust any value when it is in the web part

    1. D'arce Hess Author says:

      No, It is only a viewer not and editor of the Excel information at this time. You will need to edit the info in the actual Excel workbook.

  5. I tried to add excel file and wanted to display a chart but it is asking for the chart or table name? How do I find that? Anything you can help with?

    1. D'arce Hess Author says:

      Hi Ann,

      When you select the chart, the chart’s name appears in the Name box, which is located to the left of the formula bar. The default name will be something like Chart 2. If you selected that default and typed over it, you would have renamed the chart. I hope this helps you find the name.

  6. For some reason I am not seeing the print to pdf option (viewing word document). Does anyone know where that is enabled?

    Also I was hoping on using approval workflows to hide a document that has not been approved. Is this possible in this web part?

  7. Never mind about the print to pdf missing. Found it in the drop down list in the lower right side of the viewer rather than in the menu bar displayed across the top.

  8. Hi D’arce! This is a great web part! I have one small problem. My boss doesn’t like the fact that, while the (MS word) doc is loading, a slightly blurry image of the file is shown. Is there any way that the viewer could display a blank page while loading the file in and then show the fully-formed page without the fuzzy bit? This would make my life considerably easier! ;->

    Thanks (I hope!),
    Rich

    1. D'arce Hess Author says:

      Unfortunately, there is no way to change what the preview image is. They use the slightly blurred image as a way to reinforce that you are opening the document and that you are staying within SharePoint. Great question through.

  9. Dimakatso says:

    I get this error when I use the document viewer, please help.

    Something went wrong
    If the problem persists, contact the site administrator and give them the information in Technical Details.
    TECHNICAL DETAILS
    ERROR:
    Office Online Server needs to be set up to show a file here. Contact your administrator. Learn more at https://go.microsoft.com/fwlink/?linkid=866369

  10. How does it work with excel files? We are trying to use this web part to display one specific workbook in a multiple workbook file.
    First: we are not able to set it to display a specific work book, a user would always need to click through all of them to get to one specific one.
    Second: the file is excessively large and when we choose “displace range” in settings, SharePoint does not like the name of the sheet to display and the range we select.

    Are there any guidance on how to set those correctly so a file could be displayed properly and look presentable?

  11. Juergen Kessler says:

    Unfortunately, the fileviewer-webpart (Modern communication site onpremise) does not allow PDF Files.
    It says: “This isn’t a filetype we support. You can only upload documents”.
    Shame on MSFT. A serious showstopper.
    Thus we cancelled migration to SP2019.

  12. Hi, if I make a modification on the Excel file I attached to the View webpart, will I see the modification I made live o the viewer file? Or it’s not meant to work that way?

  13. I’ve been working in 2013 for the last 5 or 6 years. 2010 for several years before that and so on all the way back to 2001. I am constantly disappointed in Microsoft for all the unnecessary changes they make, but this online environment takes the cake. It is the absolute worst. These web parts have ZERO configuration features. But hey, it looks snazzy, huh? Pathetic.

    1. D'arce Hess Author says:

      Almost every single web part has multiple configuration options. Is there something in particular that you are looking to be able to do? You also have the ability to develop your own web parts using SharePoint Framework.

  14. Erin Wilcosh says:

    When we first started using this, we were using it because others needed to view the file easily, but not have access to edit. now you can open it to edit it from here, did this change? Do you have suggestions as to how to keep it so they can view only and not open the document?

    1. D'arce Hess Author says:

      Hi Erin,

      The best way to control whether someone can edit or not is by permissions on the library or the site collection that the document lives in. If a user only has visitor permissions on a site where the document is stored, they will not be able to edit the document, but if they have member or owner permissions on the site, then they will. Permissions could be further restricted by breaking inheritance on the document or the document library, but it is best practice to always keep permissions at the highest level possible.

  15. Is there a way to stop the download document appearing

  16. Hi D’arce Hess,
    Using the File Viewer is great! Is there a way to have the last document uploaded to the library automatically display in the file viewer?

    1. D'arce Hess Author says:

      No. Unfortunately there is a 1:1 match up with this web part. One file viewer to one file.

Comments are closed.

Scroll to top
Close