0

We want to gather the info from a google spreadsheet, and are following the code samples given in the Google Apps Platform help.

Using that code, we found the right spreadsheet and the right worksheet (the Debug line confirms it to be the right worksheet - there are only two in the whole account). However, when it comes to fetching the data from the rows, it comes back blank. So I tried to discover the number of rows, and the count comes back 0, which explains why there was no text forthcoming.

So what am I missing?

  Debug.WriteLine("Worksheet Name=" + worksheet.Title.Text);
  // Iterate through each row, printing its cell values.
  foreach (ListEntry row in listFeed.Entries){
      Debug.WriteLine("thisrow=" + row.Title.Text);
  }
  Debug.WriteLine("Number of rows=" + listFeed.Entries.Count);

P.S. I've been to this wonderful thread, but it doesn't mention list-based feeds - only cell-based feeds.

Community
  • 1
  • 1
bgmCoder
  • 6,205
  • 8
  • 58
  • 105

1 Answers1

0

Ah! Solved it:

There was a blank row just below the header row. Apparently, that breaks the dataset, which explains why I was getting no results.

The list feed contains all rows after the first row up to the first blank row. The first blank row terminates the data set. If expected data isn't appearing in a feed, check the worksheet manually to see whether there's an unexpected blank row in the middle of the data. In particular, if the second row of the spreadsheet is blank, then the list feed will contain no data.

bgmCoder
  • 6,205
  • 8
  • 58
  • 105