简体   繁体   English

如何从JavaScript中的私人Google电子表格中读取数据-2014年11月?

[英]How to read data from a private google spreadsheet in javascript — Nov 2014?

I would like to use a google spreadsheet as a simple read-only data source for a prototype. 我想将google电子表格用作原型的简单只读数据源。 I want to make an ajax request of some kind for the data and then play with it within a web page. 我想对数据发出某种ajax请求,然后在网页中播放它。 I see lots of conflicting blog posts, old documentation, etc, but nothing simple and definitive. 我看到许多相互矛盾的博客文章,旧文档等,但没有什么简单而又明确的。

Ideally, I would be able to do this without making the sheet public, and without using any kind of auth within my page, just requiring that the user of my page be logged into an account with access to the sheet. 理想情况下,我可以做到这一点而无需公开工作表,也无需在页面内使用任何形式的身份验证,只需要求我页面的用户登录到有权访问工作表的帐户即可。

Can anyone point me to a simple tutorial or documentation that shows how to do this? 谁能指出我的简单教程或文档,说明如何执行此操作?

I wound up using tabletop.js . 我结束了使用tabletop.js The tricky bit was setting permissions: I shared the document so anyone at my company could edit (view probably would work, too). 棘手的是设置权限:我共享了文档,以便公司的任何人都可以编辑(视图也可以使用)。 I also selected File > Publish to web... and made sure that was enabled, but the "Require viewers to sign in with their [Company] account" checkbox was not checked. 我还选择了“ File > Publish to web... ,并确保已启用该复选框,但未选中“要求查看者使用其[公司]帐户登录”复选框。

I'm not actually sure what level of security I currently have; 我实际上不确定当前拥有的安全级别; I suspect that it's less than I'd like. 我怀疑这比我想要的要少。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM