除 ColumnId C# SDK 外,所有 Cell 属性均为 null
All Cell properties null except ColumnId C# SDK
通过 C# SDK 检索 sheet 时,所有单元格值为空。 API 是否有访问级别或 C# SDK 是否存在错误?我可以得到列名和 id 没问题。
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();
效果很好,所以我知道我正在访问我想要的 sheet,来自 https://github.com/smartsheet-samples/csharp-read-write-sheet/blob/master/csharp-read-write-sheet/Program.cs
的示例列映射也是如此
然而...
Cell completedCell = getCellByColumnName(r, "Completed", columnMap);
string cellValue = completedCell.DisplayValue;
单元格值为空。
任何单元格 属性,ColumnId 除外返回空值。我做错了什么?
您的单元格中的值是多少?
建议:
- 在调试器中,查看行对象和所有单元格。
- 使用 Postman 等工具进行调用并检查结果
通过 C# SDK 检索 sheet 时,所有单元格值为空。 API 是否有访问级别或 C# SDK 是否存在错误?我可以得到列名和 id 没问题。
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();
效果很好,所以我知道我正在访问我想要的 sheet,来自 https://github.com/smartsheet-samples/csharp-read-write-sheet/blob/master/csharp-read-write-sheet/Program.cs
的示例列映射也是如此然而...
Cell completedCell = getCellByColumnName(r, "Completed", columnMap);
string cellValue = completedCell.DisplayValue;
单元格值为空。 任何单元格 属性,ColumnId 除外返回空值。我做错了什么?
您的单元格中的值是多少?
建议:
- 在调试器中,查看行对象和所有单元格。
- 使用 Postman 等工具进行调用并检查结果