Google Drive API和Google Spreadsheet API (v3.0)都支持获取与以下URL对应的密钥的方法:
https://docs.google.com/spreadsheet/ccc?key=[KEY]
我对Google Drive API使用了File.getId()方法,对Google Spreadsheet API使用了SpreadsheetEntry.getId或.getKey()方法。
Google Drive API...
for (File file : mResult) {
System.out.println(file.getTitle());
System.out.println(file.getId());
}
谷歌SpreaSheet应用编程接口...
SpreadsheetEntry spreadsheet = spreadsheets.get(0);
System.out.println(spreadsheet.getKey());
我的问题是,我找不到驱动器和电子表格resource....they之间的任何公共密钥,但这两个密钥都链接到相同的API,当用于替换浏览器中的密钥字段时,两者都检索相同的电子表格。
我正在尝试识别Google Drive中特定文件夹中存在的电子表格,然后使用电子表格API仅处理这些文件。Google API似乎只能返回SpreadSheet驱动器上的所有文件--我看不到按文件夹限制结果的方法。因此,我必须组合这两个API。
有什么想法吗?
发布于 2013-12-05 14:28:52
通过此URL通过google id获取工作表
https://spreadsheets.google.com/feeds/worksheets/" + googleId + "/private/full"
"googleId“来自drive SDK。工作表更像是硬盘上的电子表格文件。
发布于 2013-02-20 03:41:23
有完全相同的问题!
刚刚发现spreadsheet.getSpreadsheetLink().getHref()返回一个以文件id结尾的链接。
https://stackoverflow.com/questions/14043184
复制相似问题