我不能工作了如何通过JSONP访问谷歌小号preadsheet时使得S preadsheet是谷歌企业应用套件的一部分,为您的域帐户。
谷歌提供记录的方式来访问谷歌小号通过JSONP preadsheet一个适合正常gmail.com帐户。简而言之:
创建A S preadsheet 单击下拉旁边的共享,然后选择发布为Web页 复制并粘贴出来的URL,显示键(即之后的比特及键=) 到https://s$p$padsheets.google.com/feeds/list/0AmHYWnFLY1F-dG1oTHQ5SS1uUzhvTnZTSHNzMjdDaVE/od6/public/values?alt=json-in-script&callback=myCallback与任何键,你砍的网址出取代0AmHYWnFLY1F,dG1oTHQ5SS1uUzhvTnZTSHNzMjdDaVE当我尝试这对我自己的域名一切的似乎的工作。但是,当我访问我构建如上谷歌的网址给出了错误:
在S preadsheet在这个网址也不会被发现。请确保您有正确的网址,并且在S preadsheet车主并没有将其删除。我认为有一些权限问题或某种我应该使用替代网址,但我无法找到任何文件,否则。
解决方案这回来是pretty的毛毛,虽然数据。您可以使用YQL来获得更干净的数据:
SELECT * FROM CSV
其中,url =https://docs.google.com/s$p$padsheet/pub?key=XXXX&output=csv
![西安城里,这10个人的这10天](/d/file/2023/09-16/418372d4b4553aa00d6b0d8d424d8160.png)
如果您要命名的键,你可以添加:
和列=富,酒吧,巴兹
试试看 与您的S preadsheet;你应该得到这个(我列名为任务):
cbfunc({
查询:{
伯爵:3,
创造:2013-01-02T21:37:09Z
郎:EN-US
结果:{
行: [
{
任务:偷内裤
},
{
任务: ...
},
{
任务:利润
}
]
}
}
});
I can't work out how to access a google spreadsheet via JSONP when that spreadsheet is part of a Google Apps For Your Domain account.
Google provide a documented way to access google spreadsheet via JSONP that works for normal gmail.com accounts. In short:
Create a spreadsheet Click on the dropdown next to "Share" and select "Publish as a web page" Copy and paste out the key from the URL that shows (i.e. the bit after &key=) Go to https://spreadsheets.google.com/feeds/list/0AmHYWnFLY1F-dG1oTHQ5SS1uUzhvTnZTSHNzMjdDaVE/od6/public/values?alt=json-in-script&callback=myCallback replacing "0AmHYWnFLY1F-dG1oTHQ5SS1uUzhvTnZTSHNzMjdDaVE" with whatever key you cut out of the urlWhen I try this on my own domain everything seems to work. But when I visit the URL I have constructed as above google gives the error:
The spreadsheet at this URL could not be found. Make sure that you have the right URL and that the owner of the spreadsheet hasn't deleted it.I assume there's some permission problem or some kind of alternative url I should be using, but I can't find any documentation otherwise.
解决方案The data that comes back is pretty hairy, though. You can use YQL to get cleaner data:
select * from csv
where url="https://docs.google.com/spreadsheet/pub?key=XXXX&output=csv"
If you want to name the keys, you can add:
and columns="foo,bar,baz"
Try it here with your spreadsheet; you should get this (I named the column "task"):
cbfunc({
"query": {
"count": 3,
"created": "2013-01-02T21:37:09Z",
"lang": "en-US",
"results": {
"row": [
{
"task": "Steal underpants"
},
{
"task": "..."
},
{
"task": "Profit"
}
]
}
}
});
相关推荐
最新文章