嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PD

通过将谷歌文档的URL设置为HTML IFRAME的源,可以在网页上展示Google Drive中的文档、SpreadSheets和PDF。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Here Mudassar Ahmed Khan has explained how to embed Google Docs Viewer and display Google Drive files such as Word document (.doc, .docx), Excel Spreadsheet (.xls, .xlsx), PowerPoint presentation slides (ppt, .pptx) files and PDF documents (*.pdf) in your website’s web page.
 
In this article I will explain how to embed Google Docs Viewer and display Google Drive files such as Word document (.doc, .docx), Excel Spreadsheet (.xls, .xlsx), PowerPoint presentation slides (ppt, .pptx) files and PDF documents (*.pdf) in your website’s web page.
 
Display Google Docs Documents, SpreadSheets, PDF and Slides in Web page
 
1. Upload the file to be displayed on web page to the Google Drive.
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
 
2. Right Click the document to be displayed in Web page and Open with option as shown below.
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
 
3. Once the document is opened, click the Share button as show below.
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
 
4. Inside the Share with others Popup, click on the Get shareable link to generate the Public link to the document.
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
 
Now copy the generated link from the TextBox.
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page

 

5. Finally copy the URL set it as source to an HTML IFRAME in order to display the document on the web page.

<iframeframeborder="0"src="https://docs.google.com/spreadsheets/d/1NeUShwlPrOvHuO0gisl7XYnoNrqODw1x8JFNlzSaEro/edit?usp=sharing"width="600"height="300"></iframe>

 

The following screenshot displays the Excel spreadsheet displayed in browser.
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page
 

下载:Google_Docs_View_Documents

 
 
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值