C# Can';t使用smartsheets中的方法UpdateRowCellsBuilder
我正在尝试更新smartsheets中的单元格,但它返回错误-C# Can';t使用smartsheets中的方法UpdateRowCellsBuilder,c#,smartsheet-api,smartsheet-c#-sdk-v1,C#,Smartsheet Api,Smartsheet C# Sdk V1,我正在尝试更新smartsheets中的单元格,但它返回错误- Error 1 The type name 'UpdateRowCellsBuilder' does not exist in the type 'Tannery_Data.Cell' 名称空间称为Tannery_Data 我使用这些参考资料: using Smartsheet.Api; using Smartsheet.Api.Models; using Smartsheet.Api.OAuth; using Syste
Error 1 The type name 'UpdateRowCellsBuilder' does not exist in the type 'Tannery_Data.Cell'
名称空间称为Tannery_Data
我使用这些参考资料:
using Smartsheet.Api;
using Smartsheet.Api.Models;
using Smartsheet.Api.OAuth;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
这是代码
namespace Tannery_Data
{
class smartsheetQuery
{
public Token token;
String API = "XXXXXXX";
SmartsheetClient smartsheet;
long sheetID;
long workspaceID;
public smartsheetQuery()
{
token = new Token();
token.AccessToken = API;
smartsheet = new SmartsheetBuilder().SetAccessToken(token.AccessToken).Build(); /
sheetID = 1378721379706756;
workspaceID = 4196096982443908;
}
public void updateCell()
{
IList<Cell> cells = new Cell.UpdateRowCellsBuilder().AddCell(7735727405459332L, "TESTING").Build();
smartsheet.Rows().UpdateCells(7602661257176964L, cells);
}
namespace Tannery\u数据
{
类smartsheetQuery
{
公共令牌;
字符串API=“XXXXXXX”;
smartsheet客户端smartsheet;
长薄片;
长工作空间ID;
公共smartsheetQuery()
{
令牌=新令牌();
token.AccessToken=API;
smartsheet=新建SmartsheetBuilder().SetAccessToken(token.AccessToken.Build()/
sheetID=1378721379706756;
workspaceID=4196096982443908;
}
public void updateCell()
{
IList cells=new Cell.UpdateRowCellsBuilder().AddCell(7735727405459332L,“测试”).Build();
smartsheet.Rows().UpdateCells(7602661257176964L,单元格);
}
绝对不知道这里发生了什么?错误消息表明它正在Tannery_数据命名空间中查找Cell类。有两种方法可以解决此问题
new Cell.UpdateRowCellsBuilder()
使用new Smartsheet.Api.Models.Cell.UpdateRowCellsBuilder()
您的Tannery_数据命名空间中是否有一个名为“Cell”的类?您可以尝试使用
new Smartsheet.Api.Models.Cell.UpdateRowCellsBuilder().AddCell(7735727405459332L,“TESTING”).Build()为Cell类提供完全限定的名称
Hey Brett,谢谢!只是想知道程序如何知道我在哪张表上?或者它可以通过columnID等找到该表吗?另外,你想回答这个问题吗?如果它非常明确,那么很乐意删除post。你是对的,更新单元格时不需要该表id。C#sdk正在为发送到s的所有请求使用为了更新单元格,它专门使用只需要行id和列id的请求。