ios - 使用 googledrive url scheme 和 iOS Sheets App 打开特定的 Google Sheet 子表

标签 ios google-drive-api google-sheets

是否可以使用 googledrive://或 googlesheets://URL 方案链接到适用于 iOS 的表格应用中的特定子表格

使用浏览器中显示的 URL 和查询字符串参数 (gid=) 似乎并不能解决问题。

最佳答案

很遗憾,没有使用 url 方案打开特定子表的选项

要在适用于 iOS 的 Google 表格应用中打开特定表格,您可以使用 Google 表格的 URL 方案 (googlesheets://)。在最后一个斜杠后插入特定工作表的 URL 地址。

在 Safari 中

googlesheets://https://docs.google.com/spreadsheets/d/...

Objective-C 代码

NSString *url = @"https://docs.google.com/spreadsheets/d/...";
NSString *string = [NSString stringWithFormat:@"googlesheets://%@",url];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];

Swift代码

let url = "https://docs.google.com/spreadsheets/d/..."
let string = NSURL(string : "googlesheets://\(url)")
UIApplication.sharedApplication().openURL(string!)

如果你只想打开一个特定的工作表,这将有效 😊

关于ios - 使用 googledrive url scheme 和 iOS Sheets App 打开特定的 Google Sheet 子表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25954079/

相关文章:

python-3.x - 如何使用 python 3 遍历 google 工作表中的所有工作表?

ios - 为 Alamofire 请求输入用户名和密码

iphone - 纵向拍摄的图像在横向查看时失真

iphone - 每次触摸UIButton时将值增加1

javascript - URL 缩短器 - 自动缩短 URL

google-drive-api - 按顺序获取 Google 云端硬盘多个共享链接

google-sheets - 如何在谷歌表格中执行argmax?

google-sheets - 如何使用 Google 表格查找和求和

cocoa-touch - 如何调用电话、发送短信或在 map 上查找地址?

javascript - 使用 Javascript 中的 Google Drive API 批量插入权限 API