在节省时间方面,每个人都有自己执行任务的方式。以我们的社交生活为例,我们在每个平台上分享东西——通过链接或嵌入帖子。嵌入帖子不仅可以节省我们的时间,还可以让我们的博客看起来不错。但是,在共享文件时,我们总是倾向于共享链接。为什么?当我们也可以嵌入文件时,为什么要共享链接?我们已经了解了如何在网站上嵌入 Word 文档(embed a Word document on a website)。在本文中,我们将学习如何在您的网站上嵌入 Excel 表格(embed Excel Sheets on your website)。
要嵌入电子表格,需要OneDrive上的活动帐户和需要嵌入的文档。当您打开OneDrive上存在的任何文档时,它会使用您在系统上使用的应用程序的Web版本来打开它。
在您的网站上嵌入 Excel 表格
在开始之前,只需确保在嵌入文件之前没有在文件中添加任何重要和私人信息。
登录(Log)到您的 OneDrive 帐户并上传工作表。最好将文件保存为 .xlsx 格式。
当您复制嵌入代码时,您还会在其下方找到“自定义此嵌入工作簿的显示(Customize how this embedded workbook will appear)方式”选项。单击(Click)它,您将发现有关工作表小部件应如何显示的一些新设置。选项将包括:
- 显示什么
- 外貌
- 相互作用
- 方面
- 嵌入代码 | JavaScript
1] 显示什么
在此选项中,您可以选择要显示的整个工作簿,也可以选择小部件中的行和列范围。
2]外观
您可以通过“隐藏网格线(Hide grid lines)”、“隐藏行和列标题(Hide row and column headers)”和“包含下载链接(Include a download link)”选项来更改嵌入工作表的外观。
3]互动
在这里,您可以选择是否要让人们对数据进行过滤和过滤。让人们在单元格中输入,但数据不会被保存。始终从选中此单元格开始。
4] 尺寸
您可以选择小部件窗口的宽度和高度(以像素为单位)。
5] 嵌入代码 | JavaScript
您将在这里获得两种类型的代码,您可以从嵌入代码或JavaScript中进行选择。如果您自己运行网站并且知道JavaScript是如何工作的,那么您可以选择其中任何一个。
嵌入的文件将在网页上显示为一个小部件。观众可以根据自己的选择下载、编辑和调整。任何查看者所做的更改都是临时的,不会被保存。以下是嵌入工作表的示例:
嵌入电子表格并且网站上线后,文档将在网页上显示为小部件。
阅读下一篇:(Read next: )如何在网站上嵌入 PowerPoint 演示文稿(embed a PowerPoint presentation on a Website)。
How to Embed an Excel Sheet on your website
When it сomes to saving time, everybody has their way of performing tasks. Take the example of oυr social lives, we share things on every platform – either by linkѕ or by embedding posts. Embedding posts not only saves our time but also mаkes our blogs loоk goоd. But, when it comes to sharing files, we alwaуs tend to share thе links. Why? When we can embed the fіles too, then why ѕhare links? We have already seen how to embed a Word document on a website. In this article, we will learn how to embed Excel Sheets on your website.
To embed a spreadsheet, need an active account on OneDrive and the document you need to embed. When you open any document that is present on OneDrive, it uses the Web versions of the application you use on the system to open it.
Embed Excel Sheets on your website
Before you begin, just make sure that you haven’t added any important and private information in the file before embedding it.
Log in to your OneDrive account and upload the sheet on it. It is preferable that you keep the file in .xlsx format.
When you copy the embedding code, below it you will also find an option as “Customize how this embedded workbook will appear“. Click on it and you will discover some new settings on how the widget of your sheet should appear. The options will include:
- What to show
- Appearance
- Interaction
- Dimensions
- Embed Code | JavaScript
1] What to show
In this option, you can either select the entire workbook to be shown or select the range of rows and columns in the widget.
2] Appearance
You can change the appearance of the embedded sheet by the options as “Hide grid lines“, “Hide row and column headers” and “Include a download link“.
3] Interaction
Here you can select whether you want to let people dort and filter the data. Let people type into cells, but the data won’t get saved. Always start with this cell selected.
4] Dimensions
You can select what should be the width and height of the widget window in pixels.
5] Embed Code | JavaScript
You will get two types of codes here, you can select either from embedding code or JavaScript. If you are running the website on your own and know how the JavaScript works then you can select either of them.
The embedded file will appear as a small widget on the webpage. A viewer can download it, edit it and tweak as per his/her choice. The changes made by any viewer will be temporary and won’t get saved. Here’s the example of what an embedded sheet will look like:
After the spreadsheet is embedded and the website is live, the document will appear as a widget on the webpage.
Read next: How to embed a PowerPoint presentation on a Website.