Search code examples
smartsheet-api

All Cell properties null except ColumnId C# SDK


When retrieving a sheet via the C# SDK all the cell values are null. Is there an access level for the API or does the C# SDK have a bug? I can get the column names and id's fine.

SmartsheetClient ss = new SmartsheetBuilder().SetAccessToken(myToken).Build();
long sheet_ID = 0000000000000000;
Sheet sSheet = ss.SheetResources.GetSheet(sheet_ID, null, null, null, null, null, null, null);
lblFeedback.Text = "Sheet: " + sSheet.Name + " <br>Rows: " + sSheet.Rows.Count.ToString();

That works fine, so I know I'm accessing the sheet I want, so does the example column map from https://github.com/smartsheet-samples/csharp-read-write-sheet/blob/master/csharp-read-write-sheet/Program.cs

However...

Cell completedCell = getCellByColumnName(r, "Completed", columnMap);
string cellValue = completedCell.DisplayValue;

cellValue is null. Any cell property, except ColumnId comes back null. What am I doing wrong?


Solution

  • What value is in your cell?

    Suggestions:

    • In the debugger, take a look at the row object and all the cells.
    • Use a tool like Postman to make the call and examine the results