iframe视频代码
![iframecode04 iframecode04](https://i-blog.csdnimg.cn/blog_migrate/a55c4935e61c7dac1d3c2911bda868f5.png)
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代码。 这向我展示了创建我自己的版本所需输入的所有变量,例如高度和宽度。
![iframecode03 iframecode03](https://i-blog.csdnimg.cn/blog_migrate/088bbbede2823711427fdf8c5efc0e2c.png)
输入变量 (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和名称,但可能将所有其他设置保持不变:
![iframecode01 iframecode01](https://i-blog.csdnimg.cn/blog_migrate/a3e75f27876d62f7c4708c495af3c473.png)
合并代码字符串 (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公式基于是或否选择返回变量
![iframecode02 iframecode02](https://i-blog.csdnimg.cn/blog_migrate/3d6169edc2ecab73b852cbb435d12b93.png)
使用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视频代码