Here is the website I am using for the API: Google Spreadsheets API version 3.0
Here is my current code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Google.GData.Client;
using Google.GData.Spreadsheets;
namespace ELOSpreadsheet
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void kryptonButton1_Click(object sender, EventArgs e)
{
SpreadsheetsService service = new SpreadsheetsService("exampleCo-exampleApp-1");
// TODO: Authorize the service object for a specific user (see other sections)
service.setUserCredentials("username@gmail.com", "password");
SpreadsheetQuery query = new SpreadsheetQuery();
query.Title = "Gam3rGod's ELO Spreadsheet";
SpreadsheetFeed feed = service.Query(query);
if (feed.Entries.Count == 0)
{
// TODO: There were no spreadsheets, act accordingly.
}
// TODO: Choose a spreadsheet more intelligently based on your
// app's needs.
SpreadsheetEntry spreadsheet = (SpreadsheetEntry)feed.Entries[0];
//Response.Write(spreadsheet.Title.Text);
// Get the first worksheet of the first spreadsheet.
// TODO: Choose a worksheet more intelligently based on your
// app's needs.
WorksheetFeed wsFeed = spreadsheet.Worksheets;
WorksheetEntry worksheet = (WorksheetEntry)wsFeed.Entries[0];
// Define the URL to request the list feed of the worksheet.
AtomLink listFeedLink = worksheet.Links.FindService(GDataSpreadsheetsNameTable.ListRel, null);
// Fetch the list feed of the worksheet.
ListQuery listQuery = new ListQuery(listFeedLink.HRef.ToString());
ListFeed listFeed = service.Query(listQuery);
// Create a local representation of the new row.
ListEntry row = new ListEntry();
row.Elements.Add(new ListEntry.Custom() { LocalName = "firstname", Value = "Joe" });
// Send the new row to the API for insertion.
service.Insert(listFeed, row);
}
}
}
Every time i try to run this code I get the error:
Execution of request failed: https://spreadsheets...d6/private/full

New Topic/Question
Reply



MultiQuote





|