I'm sure I'm doing something silly, since this is my first time using the 
API. Here's the code I'm using to insert a row:

static void AddRow(AtomFeed feed)
{
    var row = new ListEntry();
    row.Elements.Add(new ListEntry.Custom
        {
            LocalName = "RegistrationDate",
            Value = DateTime.Now.ToShortDateString(),
        });
    feed.Insert(row); // throws exception
}

Exception:
Google.GData.Client.GDataRequestException: Execution of request failed:
https://spreadsheets.google.com/feeds/list/tcWuCY46Y5t5lJ4ZmCFdYxQ/od6/private/full
---> System.Net.WebException: The remote server returned an error: (400) Bad 
Request.

Response string:
We're sorry, a server error occurred.
Please wait a bit and try reloading your spreadsheet.

I believe the AtomFeed I'm passing to AddRow is correct because I can print 
out the existing data I have in the spreadsheet using the following method:

static void PrintRows(AtomFeed feed)
{
    foreach (ListEntry row in feed.Entries)
    {
        foreach (Cell cell in row.Elements)
            Console.Write("{0}: {1}, ", cell.LocalName, cell.Value);
        Console.WriteLine();
    }
}

Thanks in advance for any help you can give me!

Keith

Reply via email to