google-sheets icon indicating copy to clipboard operation
google-sheets copied to clipboard

Header row data not included in with cell row data

Open stulees opened this issue 10 years ago • 5 comments

Since only a list based feed is used to obtain the sheet data, there is no header row data returned in the google-sheet-data event and thus no way of obtaining the content of the header row cells.

When working with the data returned and want to display it in HTML, the header row cells are essential for displaying column titles, particularly in the case of displaying the data as a table.

Is this a limitation of this web component? Are there plans to include this header row data? Is there an alternative or workaround? Thanks

stulees avatar May 15 '15 20:05 stulees

Is there a way to get that in the Spreadsheets API? I haven't looked.

ebidel avatar May 16 '15 19:05 ebidel

There is another style of feed you can retrieve which is a cell based feed and when using it, each entry represents a single cell. Cells are referred to by position.

https://developers.google.com/google-apps/spreadsheets/#working_with_cell-based_feeds

The list based feed does work nicely in the context of this web component since the rows are defined as entries and makes it easy to bind as a model. However cell feed is a way to obtain that header row data and was wondering if it was possibly considered to add in somehow to this component so that data is available.

stulees avatar May 19 '15 14:05 stulees

@ebidel @stulees , have you guys explored this further? I'm trying to do the same thing and/or looking for workarounds.


I've asked a question on SO that addresses it: http://stackoverflow.com/questions/39944753/load-multiple-tabs-data-in-website-using-polymers-google-sheets-custom-elemen

oneezy avatar Oct 09 '16 13:10 oneezy

@oneezy Our company ended up building our own web component to address this because using cell based feeds is necessary for us as well as we required other aspects too.

stulees avatar Oct 12 '16 14:10 stulees

@stulees , Nice! would it happen to be opensource?

oneezy avatar Oct 13 '16 09:10 oneezy