如何找到Google SpreadSheet ID? [英] How to do I locate a Google SpreadSheet ID?

查看:133
本文介绍了如何找到Google SpreadSheet ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://developers.google.com/apps-script/指南/rest/api#parameter_and_return_types

使用Java的Google Execution Api时,电子表格的ID不太容易理解.这是代码段:

When using the Google Execution Api for Java, the ID of the spreadsheet isn't very easy to understand. Here is the code snippet:

// Initialize parameters for that function.
String sheetId = "<ENTER_ID_OF_SPREADSHEET_TO_EXAMINE_HERE>";
List<Object> params = new ArrayList<Object>();
params.add(sheetId);

有关如何找到此位置的任何想法.我运行Sheets api返回SpreadSheet的ID,但它返回一个链接,并且当我使用> https ://spreadsheets.google.com/feeds/spreadsheets/ STRING 或只是 STRING 本身,我仍然得到: 代码":404, 错误":[{ "domain":"global", "message":未找到请求的实体.", "reason":"notFound"

Any Ideas on how to locate this. I run the Sheets api to return the id of a SpreadSheet but it returns a link, and when I use the https://spreadsheets.google.com/feeds/spreadsheets/STRING or just the STRING itself I still get: "code" : 404, "errors" : [ { "domain" : "global", "message" : "Requested entity was not found.", "reason" : "notFound"

推荐答案

在Apps Script API参考中找到了这一点.

Found this deep inside the Apps Script API reference.

可以从其URL中提取电子表格ID.例如,URL https://docs.google上的电子表格ID. com/spreadsheets/d/abc1234567/edit#gid = 0 是"abc1234567".

A spreadsheet ID can be extracted from its URL. For example, the spreadsheet ID in the URL https://docs.google.com/spreadsheets/d/abc1234567/edit#gid=0 is "abc1234567".

这篇关于如何找到Google SpreadSheet ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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