按工作表名称更新电子表格

时间:2014-05-02 12:10:15

标签: c# google-sheets google-docs google-docs-api google-spreadsheet-api

我需要使用google-doc-api来更新我的网站详细信息。在Google开发人员论坛和文档中,他们仅指定使用Feed条目ID

更新工作表值

例如:WorksheetEntry worksheet = (WorksheetEntry)wsFeed.Entries[0];

在上面的代码中,我们可以编辑第一张表。但我的情况有所不同。我只有Sheet1,Sheet2 ..etc这样的工作表名称。所以我如何找到工作表并将我的值添加到我指定的工作表中。

1 个答案:

答案 0 :(得分:0)

获取工作表名称:

  foreach (WorksheetEntry entry in wsFeed.Entries)
  {
    // Get the worksheet's title, row count, and column count.
    string title = entry.Title.Text;
    int rowCount = entry.Rows;
    int colCount = entry.Cols;

    // Print the fetched information to the screen for this worksheet.
    Console.WriteLine(title + "- rows:" + rowCount + " cols: " + colCount);
  }

自: https://developers.google.com/google-apps/spreadsheets/#retrieving_information_about_worksheets

相关问题