如何将谷歌电子表格中的数据放入我的网页? [英] How do i place data from google spreadsheets to my webpage?

查看:108
本文介绍了如何将谷歌电子表格中的数据放入我的网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个代码从Google电子表格中检索数据:

I have this code that retrieves data from a google spreadsheet:

<html>
<head>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.js"></script>

<script type="text/javascript" src="https://chriszarate.github.io/sheetrock/dist/sheetrock.min.js"></script>

<script type='text/javascript'>//
$(window).load(function(){
// Define spreadsheet URL.
var mySpreadsheet = 'https://docs.google.com/spreadsheets/d/1pNV3kEzW-zhuhwwLRM3g_YmSRO9r-wiJAEv6v4pMwEI/edit#gid=0';
// Load an entire worksheet. 
$('#statistics').sheetrock({
url: mySpreadsheet
});
});h
</script>
</head>
<body>
<table id="statistics" class="table"></table>
</body>
</html>





这是我的网站http://redcurb.com/cappitalsite/,我想要做的就是从电子表格中获取数据成为现场承诺得分http://prntscr.com/a556ma



该部分代码:





This is my site http://redcurb.com/cappitalsite/ and what I want to do is place that data I get from the spreadsheet to be the "live commitment score" http://prntscr.com/a556ma

Code for that part:

<!-- Commitment Section -->
<div class="section-block replicable-content pt-60 pb-30 call to-action-2 call-to-action-2-1 bkg-grey-ultralight background-cover">
<div class="row">
<div class="column width-6 offset-3 center color-white">
<h1 class="title-xlarge" style='font-weight:bold'>92.99%</h1>
<h2 style='font-weight:bold'>Live Commitment Score</h2>
<p style='font-weight:bold'>Yes, we record every commitment we make to our clients</p>
</div>
</div>
</div>
<!-- Commitment Section End -->





我尝试过:



这只显示左上角的数据



< table id =statisticsclass =table>< / table>



What I have tried:

This only shows the data at the top left side

<table id="statistics" class="table"></table>

推荐答案

窗口)。load( function (){
// 定义电子表格URL。
var mySpreadsheet = ' https://docs.google.com/spreadsheets/d/1pNV3kEzW-zhuhwwLRM3g_YmSRO9r-wiJAEv6v4pMwEI/edit#gid=0' ;
// 加载整个工作表。
(window).load(function(){ // Define spreadsheet URL. var mySpreadsheet = 'https://docs.google.com/spreadsheets/d/1pNV3kEzW-zhuhwwLRM3g_YmSRO9r-wiJAEv6v4pMwEI/edit#gid=0'; // Load an entire worksheet.


' #statistics')。 sheetrock({
url:mySpreadsheet
});
}); h
< / script >
< / head >
< 正文 >
< id = statistics class = table > < / table >
< / body >
< / html >
('#statistics').sheetrock({ url: mySpreadsheet }); });h </script> </head> <body> <table id="statistics" class="table"></table> </body> </html>





这是我的网站http://redcurb.com/cappitalsite/,我想要做的就是从电子表格中获取数据成为现场承诺得分http://prntscr.com/a556ma



该部分代码:





This is my site http://redcurb.com/cappitalsite/ and what I want to do is place that data I get from the spreadsheet to be the "live commitment score" http://prntscr.com/a556ma

Code for that part:

<!-- Commitment Section -->
<div class="section-block replicable-content pt-60 pb-30 call to-action-2 call-to-action-2-1 bkg-grey-ultralight background-cover">
<div class="row">
<div class="column width-6 offset-3 center color-white">
<h1 class="title-xlarge" style='font-weight:bold'>92.99%</h1>
<h2 style='font-weight:bold'>Live Commitment Score</h2>
<p style='font-weight:bold'>Yes, we record every commitment we make to our clients</p>
</div>
</div>
</div>
<!-- Commitment Section End -->





我尝试过:



这只显示左上角的数据



< table id =statisticsclass =table>< / table>



What I have tried:

This only shows the data at the top left side

<table id="statistics" class="table"></table>


这篇关于如何将谷歌电子表格中的数据放入我的网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆