If you want to embed a YouTube video on your website, YouTube will create some IFRAME code for you. If you want to embed content from somewhere else, you might have to create your own IFRAME code, or find a free generator somewhere in the interwebs. Or, you can download my sample file, and create IFRAME code in Excel.

如果您想在自己的网站上嵌入YouTube视频,YouTube会为您创建一些IFRAME代码。 如果要从其他位置嵌入内容,则可能必须创建自己的IFRAME代码,或在互连网上的某个位置找到免费的生成器。 或者,您可以下载我的示例文件,并在Excel中创建IFRAME代码。

查找样本IFRAME代码 ( Find Sample IFRAME Code )

To create the code, I copied sample IFRAME code from my latest Excel tutorial on YouTube. That showed me all the variables – such as height and width – that I’d need to enter, to create my own version.

为了创建代码,我从YouTube上最新的Excel教程中复制了示例IFRAME代码。 这向我展示了创建我自己的版本所需输入的所有变量,例如高度和宽度。

输入变量 ( Enter the Variables )

In an Excel file, I set up a worksheet with cells where you enter the variables. You’d have to change the video ID and name for each IFRAME , but could probably leave all the other settings the same:

在一个Excel文件中,我建立了一个包含输入变量的单元格的工作表。 您必须为每个IFRAME更改视频ID和名称,但可能将所有其他设置保持不变:

合并代码字符串 ( Combine the Code Strings )

In a cell below the variable entry section, I created an IFRAME formula that combines all the variables with the rest of the code. The formula looks complicated, but it’s just combining a bunch of things:

在变量输入部分下面的单元格中,我创建了一个IFRAME公式,该公式将所有变量与其余代码结合在一起。 该公式看起来很复杂,但它只是结合了很多东西:

  • It uses the & operator, to combine text strings

    它使用&运算符来组合文本字符串

  • The CHAR function uses 34 as its argument, to create double quote marks

    CHAR函数使用34作为其参数,以创建双引号

  • The IF formulas return a variable based on Yes or No selections

    IF公式基于是或否选择返回变量

使用IFRAME代码 ( Use the IFRAME Code )

Here’s the result, when I copy the IFRAME/HTML code, and paste it into the HTML source code for this article.

当我复制IFRAME / HTML代码并将其粘贴到本文HTML源代码中时,结果就是这样。

  • The iframe code shows the video

    iframe代码显示了视频

  • Below that, the HTML code shows a text link.

    在此之下,HTML代码显示一个文本链接。

This video won’t show you how to build an iframe, but it will show you the new SHEET and SHEETS functions!

该视频不会向您展示如何构建iframe,但会向您展示新的SHEET和SHEETS功能!

下载样本文件 ( Download the Sample File )

To download the sample file, please visit my Contextures website. Go to the Sample Files page, and in the Functions section , look for FN0034 - Create IFRAME Code in Excel .

要下载示例文件,请访问我的Contextures网站。 转到“示例文件”页面,然后 在“功能”部分中 ,查找 FN0034-在Excel中创建IFRAME代码

The zipped file is in xlsx format, and does not contain any macros. _____________

压缩文件为xlsx格式,不包含任何宏。 ______________

翻译自: https://contexturesblog.com/archives/2014/05/27/create-iframe-code-in-excel/

iframe视频代码

如果直接在html 手工实现,将花费很多时间。 一种快速的解决方案是:将 excel 需要展示的表格拷贝到word ,再保存成htm格式,再嵌入到 iframe 。 这样可以在不破坏原有页面格式的情况下展现复杂的 excel 内容。 < iframe marginwidth=0 marginheight=0 src='http://www.wsview.com/yzplayerAction!play2.action?autoPlay=true&userVideoID=37481' frameborder=0 width=900 scrolling=no height=600 allowtransparency&... iframe 一般用来包含别的页面,例如我们可以在我们自己的网站页面加载别人网站的内容,为了更好的效果,可能需要使 iframe 透明效果,那么就需要了解更多的 iframe 属性。 1、 iframe 定义和用法 iframe 元素会 创建 包含另外一个文档的内联框架(即行内框架)。 HTML 与 XHTML 之间的差异         在 HTML 4.1 Strict D... 需求:自己开发的一个 视频 网站不想把自己上传 视频 和封面图片,因为一个一个上传 视频 文件和封面图片还是很费时间的,想着直接抓取点b站上的 视频 iframe 分享的链接和图片链接到我的数据库 ,这样网站就很快就填充起来了,看着就丰满多了(单纯是为了让我开发的系统看着有数据丰满点好看)。 思路分析:爬取大量的 iframe 代码 视频 标题以及 视频 封面照片的链接保存到数据库就行。当然如果您是要爬取后把 视频 文件也下载到自己电脑的话,也可以用 java 代码 实现的哦。 实际操作: 1、先用浏览器打开b站,开发者模式(浏览器开发者模式 并在全部内置功能的演示 代替了插入 EXCEL 表格的功能(由于此功能需要服务器安装office2000,使用环境有限制,所以从演示 去掉,但保留此功能,有需要请自行在配置文件 增加<rightarea> excel )。 4) 压缩包 ...