/// <summary>
/// Updates a single cell in the specified worksheet.
/// </summary>
/// <param name="service">an authenticated SpreadsheetsService object</param>
/// <param name="entry">the worksheet to update</param>
private static void UpdateCell(SpreadsheetsService service, WorksheetEntry entry)
{
AtomLink cellFeedLink = entry.Links.FindService(GDataSpreadsheetsNameTable.CellRel, null);
CellQuery query = new CellQuery(cellFeedLink.HRef.ToString());
Console.WriteLine();
Console.Write("Row of cell to update? ");
string row = Console.ReadLine();
Console.Write("Column of cell to update? ");
string column = Console.ReadLine();
query.MinimumRow = query.MaximumRow = uint.Parse(row);
query.MinimumColumn = query.MaximumColumn = uint.Parse(column);
CellFeed feed = service.Query(query);
CellEntry cell = feed.Entries[0] as CellEntry;
Console.WriteLine();
Console.WriteLine("Current cell value: {0}", cell.Cell.Value);
Console.Write("Enter a new value: ");
string newValue = Console.ReadLine();
cell.Cell.InputValue = newValue;
AtomEntry updatedCell = cell.Update();
Console.WriteLine("Successfully updated cell: {0}", updatedCell.Content.Content);
}
당신이 여기에있는 .NET 라이브러리를 사용하고 있습니까 : 어떻게 그런 짓을 할 수 있습니까? http://code.google.com/p/google-gdata/ – dana
예, 사용하고 있습니다. 나는 그 해답을 찾았습니다. CellFeed.Entries 배열에 멤버가 하나만 있도록 CellQuery의 열과 행의 최소값과 최대 값을 동일하게 설정해야합니다. 그런 다음 그 회원에게 접속하십시오. (아래 코드 참조) – carlilelance