【发布时间】:2016-05-29 22:37:46
【问题描述】:
我试图找出如何在谷歌表格中修改或写入单元格。 我使用快速入门指南成功阅读了我的工作表(在我的驱动器上)(我复制并粘贴了此代码:https://developers.google.com/sheets/quickstart/ios#step_3_set_up_the_sample)。我刚刚更改了网址:
https://sheets.googleapis.com/v4/spreadsheets/my_spreadsheet_Id/values/Feuil1!A1:F
.
但不可能找到写在我的工作表单元格上的代码...当我查看时:https://developers.google.com/sheets/guides/values#methods。我不明白我应该把我的新数据放在哪里。
示例:我在单元格 A1 上有“纽约”。 我想把“纽约”改成“大溪地”。
你知道怎么做吗?
我试过了,但没用:
- (void)modifyListe {
NSString *baseUrl = @"https://sheets.googleapis.com/v4/spreadsheets/";
NSString *spreadsheetId = @"{MySpredsheet_ID}"; // choisir la bonne
NSString *range = @"/values/Feuil1!G1:G1?valueInputOption=Tahiti";
baseUrl = [baseUrl stringByAppendingString:spreadsheetId];
baseUrl = [baseUrl stringByAppendingString:range];
[self.service fetchObjectWithURL:[NSURL URLWithString:baseUrl]
objectClass:[GTLObject class]
delegate:self
didFinishSelector:@selector(displayMajorsWithServiceTicketT:finishedWithObject:error:)];
}
解决方案:看第二个帖子
【问题讨论】:
标签: ios google-spreadsheet-api