javascript - 如何像google Drive一样在网页中查看office文件

标签 javascript jquery angularjs node.js

我的项目基于 Node.js(后端)和 AngularJs(前端),因此我想在我的网页中打开 Office 文件(.doc .ppt 等)。我的文件存储在 Amazon s3 服务器中。我想在我的网页中打开这些文件。

所以我需要类似谷歌驱动器的功能来查看文件。

有什么想法吗?

最佳答案

如果您只想查看,可以通过 <iframe> 使用 Google 文档查看器或通过 <iframe> 访问 Microsoft Office 365 查看器.

<iframe src="http://docs.google.com/gview?url=http://remote.url.tld/path/to/document.doc&embedded=true"></iframe>

<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>.</iframe>

How do I render a Word document (.doc, .docx) in the browser using JavaScript?获得的解决方案

关于javascript - 如何像google Drive一样在网页中查看office文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48059473/

相关文章:

javascript - jquery 用值关联数组替换选择选项

javascript - 导航栏中的外部 URL 在 Bootstrap 中不起作用

html - 使用对话框显示图片

javascript - 如果我将一个元素从一个容器移动到另一个容器,是否存在范围问题?

javascript - 通过 AJAX/AngularJS 发送调整大小的图像

javascript - 如何让 angular.js 不覆盖其他库的链接功能?

Javascript 数组随机播放

Javascript - 用逗号访问属性 - 程序员的意思是什么?

javascript - 如何使用jquery和php动态更新分数而不刷新页面

用于查找推文计数的 jquery 插件或例程