Google api Google电子表格Api,将基于列表的提要放在特定单元格上

Google api Google电子表格Api,将基于列表的提要放在特定单元格上,google-api,google-spreadsheet-api,Google Api,Google Spreadsheet Api,正如Google Api一样,我可以轻松地将数据放入电子表格,如下所示: namespace MySpreadsheetIntegration { class Program { static void Main(string[] args) { SpreadsheetsService service = new SpreadsheetsService("MySpreadsheetIntegration-v1"); // TODO: Author

正如Google Api一样,我可以轻松地将数据放入电子表格,如下所示:

namespace MySpreadsheetIntegration
{
  class Program
  {
    static void Main(string[] args)
    {
      SpreadsheetsService service = new SpreadsheetsService("MySpreadsheetIntegration-v1");

      // TODO: Authorize the service object for a specific user (see other sections)

      // Instantiate a SpreadsheetQuery object to retrieve spreadsheets.
      SpreadsheetQuery query = new SpreadsheetQuery();

      // Make a request to the API and get all spreadsheets.
      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];
      Console.WriteLine(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" });
      row.Elements.Add(new ListEntry.Custom() { LocalName = "lastname", Value = "Smith" });
      row.Elements.Add(new ListEntry.Custom() { LocalName = "age", Value = "26" });
      row.Elements.Add(new ListEntry.Custom() { LocalName = "height", Value = "176" });

      // Send the new row to the API for insertion.
      service.Insert(listFeed, row);
    }
  }
}
如果我把“firstname”写进A1,把“lastname”写进B1,这是可行的,但我想启动这个函数,即F21

我的意思是,我的localname firstname在单元格F21中,我希望google api将我的数据“JOE”放入F22单元格中,然后

我该怎么做


问候

CellFeed可以做到这一点,但列表feed更像是SQL风格的数据库表。 建议您整行使用CellFeed或更新数据SQL样式

当我发现您对数据位置的控制是如此之少时,我放弃了列表提要

好例子: CellFeed

ListFeed