Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created March 10, 2012 13:25
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsakamoto/2011416 to your computer and use it in GitHub Desktop.
Save jsakamoto/2011416 to your computer and use it in GitHub Desktop.
GDataDB を使って、ASP.NET MVC3 アプリから Google Docs スプレッドシートへ書き込みを行う
// GDataDB を NuGet Package Manager を使ってプロジェクトに追加しておくこと。
[HttpPost]
public ActionResult Index(Attendee attendee)
{
// ここでスプレッドシートへ書き込み
var gdbclient = new GDataDB.DatabaseClient("(user name)", "(password)");
var db = gdbclient.GetDatabase("Attendees");
var tbl = db.GetTable<Attendee>("Sheet1");
tbl.Add(attendee);
return RedirectToAction("Complete");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment