I'm having trouble creating an unbounded named range via the API. The 
created range, is having the endpoints default to the dimensions of the 
worksheet.

example request (omitting unused keys):

{"requests": [{"addNamedRange": {"namedRange": {"range": {"sheetId": 0}, 
"name": "test", "namedRangeId": ""}}}]}


example request 2 (with all keys provided, and NULL values for unbounded):

{"requests": [{"addNamedRange": {"namedRange": {"range": {"sheetId": 0, 
"startRowIndex": null, "startColumnIndex": null, "endRowIndex": null, 
"endColumnIndex": null}, "name": "test", "namedRangeId": ""}}}]}


both request yield this response:

{'spreadsheetId': 'xxxxxxx', 'replies': [{'addNamedRange': {'namedRange': 
{'namedRangeId': '1134990510', 'name': 'test', 'range': {'sheetId': 0, 
'startRowIndex': 0, 'endRowIndex': 1001, 'startColumnIndex': 0, 
'endColumnIndex': 75  }}}}]}


I can create an unbounded named range via the website, and retrieving it 
via API yields the proper data, with all unset keys omitted from the range 
data. Attempting to pass the info directly back in with no modifications 
results in the range being explicitly bound to the current dimensions of 
the sheet, so future row/column additions will not be covered. It appears 
there is no possible way to avoid this behavior.

However, when I add protected ranges via API, they are handled properly, 
and unset values are left unset. What is the difference here? How can I get 
around this behavior?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-spreadsheets-api/d16675a8-5a36-4149-967f-307e737f6723%40googlegroups.com.

Reply via email to