Adding content to a previously deleted cell using google APIs
I am trying to follow the instructions in the google API to change the content on a newly created sheet. I did the following in the API: Authenticated with OATH2, selected my table and created a new worksheet. However, I can't figure out how to update the cell content in this sheet.
I created a worksheet with these dimensions:
worksheet.Cols = 100; worksheet.Rows = 200;
However, when using this code to update a cell, it does not work: (based on the code under Change Cell Content in API Document here )
// Fetch the cell feed of the worksheet.
CellQuery cellQuery = new CellQuery(worksheet.CellFeedLink);
CellFeed cellFeed = service.Query(cellQuery);
Console.WriteLine("Cells:" + cellFeed.Entries.Count);
// Iterate through each cell, updating its value if necessary.
foreach (CellEntry cell in cellFeed.Entries)
{
if (cell.Title.Text.Equals("A1"))
{
cell.InputValue = "test";
cell.Update();
}
}
It only works if I have previously placed the data in a cell, but not when creating a new one and thus empty.
I believe the problem is because the core of the cell does not contain any cells in the newly created empty table. If so, how do I add content to the cell if not using this method?
source to share
No one has answered this question yet
Check out similar questions: