Unfortunately, at the moment, you must use the cells feed to accomplish this. I'm considering a feature that would allow you to fetch the header row with the lists feed, but I don't have an ETA yet.
-Vic On Fri, Mar 4, 2011 at 9:56 PM, Jason Cipriani <[email protected]>wrote: > Using PHP Zend bindings for spreadsheet API. > > If I have a WorksheetEntry; I can use getContentsAsRows() to get all of the > entries in that worksheet's list feed. > > The keys in each list entry are the column headers converted to lowercase > with all non alpha-numeric characters stripped out. > > How do I get the real column names for this worksheet entry, and the > corresponding list entry keys for each column? Alternatively, a way to get > the real column name given the list entry key would work too. > > My goal is to be able to both display the real column header text > (spreadsheet column headers are Google Forms questions) to the user of my > application, and also to know what the list entry key is for each column so > I can display the values of the columns as well. > One way I've been toying with is to use a cell feed to get the first row > and read the headers that way. > > But then, how do I build a correspondence between the column headers and > the list entry values? > > Am I guaranteed that the values in a list entry will be returned in > left-to-right GUI order, and empty values will be present (value count will > be equal to column count)? > > Being able to display the column headers and the corresponding values in an > application seems like a very reasonable goal, I feel like I'm missing > something because this is surprisingly clunky... > > Thanks! > Jason >
