1
votes

Here is an example: https://spreadsheets.google.com/feeds/list/1a2JzZzUjSIcpROgR5v_M-UmWyT-iokcegIxHJOopZWA/od6/public/full?alt=json

The returned JSON data doesn't contain the first row from the spreadsheet. You can view the contents of the spreadsheet in HTML (https://docs.google.com/spreadsheets/d/1a2JzZzUjSIcpROgR5v_M-UmWyT-iokcegIxHJOopZWA/pubhtml) to verify that "first row" exists in the sheet.

How can I get the first row from the spreadsheet? There is a "openSearch$startIndex" = 1 in the returned JSON. Maybe if you could set this to 0, I could get the first row also.

2
Are you using a list-based feed? In particular, the list feed treats the first row of the worksheet as a header row; Spreadsheets dynamically creates XML elements named after the contents of header-row cells. However, have you had a chance to take a look at this? - pointNclick
Ah, thanks for the explanation! Python is not an option in my case, but I can live without it. - Joonas Harjumäki

2 Answers

0
votes

In C# you would do it like this:

var link = worksheet.Links.FindService(GDataSpreadsheetsNameTable.CellRel, null).HRef.ToString();
var cellQuery = new CellQuery(link)
    {
        MinimumRow = 1,
        MaximumRow = 1,
        MinimumColumn = 1
    };
CellFeed header = spreadsheetService.Query(cellQuery);