简体   繁体   English

在 iframe 中嵌入 Office Online(Word、Excel、Powerpoint)

[英]Embed Office Online (Word, Excel, Powerpoint) in iframe

I am looking for a way to embed Office Online editors in an iframe .我正在寻找一种将 Office Online 编辑器嵌入iframe I need https://portal.office.com/ as the src of the iframe, but that does not seem to work.我需要https://portal.office.com/作为 iframe 的src ,但这似乎不起作用。

Then I thought I could maybe embed an empty document in there and have it be saved as a new file upon use.然后我想我可以在其中嵌入一个空文档,并在使用时将其另存为新文件。 This does not seem to be possible however, as embedded documents are presented as read-only.然而,这似乎是不可能的,因为嵌入的文档显示为只读。

Does anybody know how to embed any of the Office Online editors in an iframe ?有人知道如何在iframe嵌入任何 Office Online 编辑器吗?

I've used this fiddle to tinker around in jsfiddle.net/n7e3wv6v/33我用这个小提琴在jsfiddle.net/n7e3wv6v/33 中进行了修改

Yes I think it can be done with the following code, src document must be public and a extension known by office (docx, xls ...) :是的,我认为可以使用以下代码完成,src 文档必须是公开的并且是 office 已知的扩展名(docx、xls ...):

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=http://remote.url.tld/path/to/document.doc' width='1366px' height='623px' frameborder='0'>
This is an embedded
<a target='_blank' href='http://office.com'>Microsoft Office</a>
document, powered by
<a target='_blank' href='http://office.com/webapps'>Office Online</a>.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM