Reputation: 3908
New to gdata and google sheets api. I have a service that lets users upload spreadsheets to our website with information on their information: zip code, name, city, etc. There is no defined format for the spreadsheet. We have instead opted for letting the user define a named range for the information. eg they put their zip code in a cell named "zip_code", etc. How can I then access the named range? I've done a quick test using cell B3 and named it "zip_code". I can access data for B3 but I can't find "zip_code" anywhere:
cells = gd_client.GetCellsFeed(key, worksheet_id, 'R3C2')
returns:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom" xmlns:ns1="http://schemas.google.com/spreadsheets/2006">
<ns0:category scheme="http://schemas.google.com/spreadsheets/2006" term="http://schemas.google.com/spreadsheets/2006#cell" />
<ns0:id>https://spreadsheets.google.com/feeds/cells/1ElzAH0s_sO3VaEGi2Z8scrX-5ML9614lMjOVQFSIa3/od6/private/full/R3C2</ns0:id>
<ns0:content type="text">10001</ns0:content>
<ns0:title type="text">B3</ns0:title>
<ns1:cell col="2" inputValue="10001" row="3">10001</ns1:cell>
<ns0:link href="https://spreadsheets.google.com/feeds/cells/1ElzAH0s_sO3VaEGi2Z8scrX-5ML9614lMjOVQFSIa3/od6/private/full/R3C2" rel="self" type="application/atom+xml" />
<ns0:link href="https://spreadsheets.google.com/feeds/cells/1ElzAH0s_sO3VaEGi2Z8scrX-5ML9614lMjOVQFSIa3/od6/private/full/R3C2/h30473" rel="edit" type="application/atom+xml" />
<ns0:updated>2015-01-24T16:06:08.280Z</ns0:updated>
</ns0:entry>
How do I get the named range for a cell?
Upvotes: 0
Views: 244
Reputation: 3700
AFAIK not possible. I have used the API a lot, there is only support for read/write of cell formulas/values, nothing else as far as I can tell. No "Style" info or Named range etc.
You can get the named range with Google-apps-script if you need a workaround. HTML service is probably the best way.
Or you can always use Ethercalc, an open source google-docs style spreadsheet.
Upvotes: 1