On Jul 6, 6:41 pm, Barry Welch <btwel...@gmail.com> wrote:
> I have a spreadsheet with columns like <3, 3-5, 6-10, 10-14, 14+, etc
> to denote age groups. I want to fetch these values in an API call, but
> when the api call returns, the data values look like this:
>
> <entry>
> ...
>   <gsx:gender>All</gsx:gender>
>   <gsx:_dnp34>No</gsx:_dnp34>
>   <gsx:_d88ul>Yes</gsx:_d88ul>
>   <gsx:_d6ua4>Yes</gsx:_d6ua4>
>   <gsx:_dkvya>Yes</gsx:_dkvya>
>   <gsx:_dmair>No</gsx:_dmair>
> </entry>
>
> I know that the API approximates column names into XML tags, but dow
> does "<3" become "_dnp34"...
>
> For my app, I need to know what to expect the XML tag name to be...
> and there is no way I understand how to convert <3 to _dnp34 and
> back.
>
> What's going on here?

The problem is that <3 can't be converted to a valid XML key, since it
has invalid characters. Instead of trying to strip those out, we just
assign the column a semi-random name. There's no way to predict it (at
least as far as I know).

As a workaround, you could:
1. Make sure that column names only contain alphanumeric characters.
2. Switch to the new table and records feeds. This API provides a
better interface for handling column names, since you specify them
yourself when you create the table specification:

http://code.google.com/apis/spreadsheets/docs/3.0/developers_guide_protocol.html#TableFeeds

--
Trevor Johns
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to