How to turn Word, Excel and Power Point previews into Power Apps canvas apps.

I found this article interesting and tried it out.
Consumer Privacy Act (CCPA) Opt-Out Icon
スポンサーリンク

Advance preparation

Save sample files in the SharePoint document library and display these previews in the Canvas app.

Building Power Apps

Building Power Apps is simple, adding a Gallery and PDF Viewer to display the document library mentioned earlier.
Then, if you put the following expression in the Document property of the PDF Viewer, the preview will be displayed in the viewer.

Substitute(GalleryName.Selected.Thumbnail.Large, "/thumbnail", "/pdf")

Word files are displayed nicely,
and Excel can also display previews.

Problem

However, some Excel files may not show a preview,
and when Power Point is updated,
the preview may not keep up with the update.

The formula seems to use thumbnails of SharePoint office files, so the display may not be updated if the thumbnails stored in this SharePoint are not updated.

So there are some problems, but if you just want to display a simple preview, this was a very useful tip.

*But be careful when integrating it into your product, as the PDF viewer itself is still in the testing phase and we have not yet confirmed why it works in this way.

Related articles.

Copied title and URL