0

我正在尝试更新 Google 表格电子表格中的单元格.....superRange在这种情况下A328:A,我收到了消息

2018-05-10 11:53:16.434032-0700 LAADyeApp[3252:1832239] Error: Invalid JSON payload received. Unknown name "a328:_a" at 'data.values[0]': Cannot find field.

NSArray *data = [NSArray arrayWithObjects: @{ superRange: @"test" } , nil];
GTLRSheets_ValueRange *value;
NSMutableDictionary *datum = [[NSMutableDictionary alloc]initWithDictionary: @{ @"values": data }];
value = [GTLRSheets_ValueRange objectWithJSON:datum];
GTLRSheetsQuery_SpreadsheetsValuesUpdate *query2 = [GTLRSheetsQuery_SpreadsheetsValuesUpdate queryWithObject:value spreadsheetId:spreadsheetId range:superRange];


[self.service executeQuery:query2
                  delegate:self
         didFinishSelector:@selector(displayResultWithTicket:finishedWithObject:error:)];

这是一些调试数据

2018-05-10 11:53:15.318726-0700 LAADyeApp[3252:1832239] Testing range: A328:A
2018-05-10 11:53:15.318863-0700 LAADyeApp[3252:1832239] Getting sheet data...
2018-05-10 11:53:15.335954-0700 LAADyeApp[3252:1832239] OK: (
        {
        "A328:A" = test;
    }
)
2018-05-10 11:53:16.434032-0700 LAADyeApp[3252:1832239] Error: Invalid JSON payload received. Unknown name "a328:_a" at 'data.values[0]': Cannot find field.

如何正确创建/初始化 a GTLRSheets_ValueRange,然后更新它?

4

0 回答 0