Embed Microsoft Office 365 Word or Excel document inside Glide App

I would like to embed documents (Word or Excel documents) stored in a single folder on Microsoft Sharepoint or Microsoft OneDrive inside a Glide app.

I’m hoping to not only see the document (though displaying anything would already be a good start), but also if possible an Office editing panel so the document could be edited directly from inside the Glide app (basic editing would be fine).

I attempted the following:

  • Created a Word document in Microsoft Office 365
  • Shared the document and made sure it was accessible by anyone with the link
  • Directly from the share/embed panel from the document, copied the “embed snippet of code” which seems to be an HTML iframe.
  • Pasted this snippet of code inside a rich text component inside the layout editor: the document did not display.
  • Pasted this same snippet of code inside a custom AI component: same result, the document did not display.

Has anyone successfully attempted this? Or do we know for sure that this might not be possible so I don’t continue down this rabbit hole?

UPDATE: Exploring the “web embed” component is probably the correct approach.

Did your try the web embed component? Use an HTML to URL column to convert it.

The web embed component works nicely indeed, thanks.

Editing isn’t possible with the basic script I used, I’ll see if I can find another one that would allow the use to edit the document. Technically, do you feel that would be possible, or is web embed mostly for the display of the source but not writing to the source.

Is there an action= in the embed code? Can you share it redacting the important parts?

No action= in the embed code.

Here is the embed code:

<iframe src="``https://1drv.ms/w/c/a2ebec9f16cd08c5/IQRtbgISM6irQbqG_nw9vysfASsNeuYHNLTPyoJVTMWKAuM``" width="476px" height="288px" frameborder="0">This is an embedded <a target="_blank" href="``https://office.com``">Microsoft Office</a> document, powered by <a target="_blank" href="` https://office.com/webapps `">Office</a>.</iframe>

I’m off to bed, it’s late where I am.

Seems like a CORS issue with editing.

3 Likes

I’m curious about this, but unfortunately I can’t test it myself.
My idea is to try entering the direct URL without adding any iframe tag. Let Glide handle the embedding automatically.

https://1drv.ms/w/c/a2ebec9f16cd08c5/EW1uAhIzqKtBuob-fD2_Kx8BmbharPan2trIAWz1tfptaA?e=8twLhZ

Also, your code includes backticks, which shouldn’t be there.

1 Like

I didn’t edit the code, I just copied it from Word.

Either the code includes the back ticks to start out with, or maybe they were added when I pasted the code in the past.

Thanks for pointing this out.

I’ll try this too, thanks for the suggestion.

1 Like

Workarounds would therefore be:

  1. Reduce expectations of the features: instead of editing within the Glide app, provide a link or button to take the user to a Word editing environment outside of the application?
  2. Use another document editing service such as Google, Proton (though no spreadsheets yet) or another?
  3. Anything else?

@nathanaelb I haven’t tried it, but my gut says this is going to work just fine with Google Docs/Sheets if you’re sharing it to “anyone with the link” and selecting permission level: “editor” (using web embed indeed)

1 Like

I would just do this to save the headache and keep everything in your current Microsoft Office environment.

1 Like

I plugged in a Google Docs link and then a Google Sheets link in the embed component, and indeed it works beautiful. Via Google, users would be able to edit directly from within the Glide app.

This solution is very elegant, thank you.

I’ll also continue exploring the see if the same is achievable with the Microsoft environment.

1 Like

Embedding a Google link works nicely with the editing options and all.

I’ll see if an LLM can tweak that Microsoft embed code to get a similar result.

If it’s not possible, I’ll have to decide if I’m opting for the wanted behavior in the Google environnement, or a pretty good but still not ideal behavior in the Microsoft environment.

2 Likes

Good luck! Will you let us know here if you manage to?

I’ll let you know.

1 Like