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.

17 Comments

  • comment-avatar
    Thangu December 9, 2017 (1:23 pm)

    Awesome

  • comment-avatar
    Greg M. August 28, 2018 (2:23 pm)

    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?

    • comment-avatar
      D'arce Hess September 8, 2018 (3:16 am)

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

  • comment-avatar
    Deb R November 30, 2018 (4:17 pm)

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

    • comment-avatar
      D'arce Hess March 2, 2019 (2:48 am)

      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?

  • comment-avatar
    Dinesh Kumar February 12, 2019 (7:49 am)

    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.

    • comment-avatar
      D'arce Hess March 2, 2019 (2:43 am)

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

      • comment-avatar
        Enrikas March 24, 2021 (1:11 pm)

        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?

        • comment-avatar
          D'arce Hess April 27, 2021 (3:09 pm)

          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.

  • comment-avatar
    Leon August 16, 2019 (1:24 pm)

    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

    • comment-avatar
      D'arce Hess January 9, 2020 (2:56 pm)

      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.

  • comment-avatar
    Ann November 12, 2019 (2:44 am)

    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?

    • comment-avatar
      D'arce Hess January 9, 2020 (2:25 pm)

      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.

  • comment-avatar
    Joel February 7, 2020 (1:06 am)

    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?

  • comment-avatar
    Joel February 7, 2020 (1:14 am)

    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.

  • comment-avatar
    Rich Smith February 27, 2020 (5:24 pm)

    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

    • comment-avatar
      D'arce Hess March 31, 2020 (1:56 pm)

      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.