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

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

问题描述

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

在使用 Google Execution Api for Java 时,电子表格的 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,错误":[{域":全局","message" : "未找到请求的实体.",原因":未找到"

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.例如,网址 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 电子表格 ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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