我希望能够从C#中的特定列中检索数据行作为列表.因此,如果有一列人物高度,它会列出列表中的那些高度.可能还列出x,y值表示特定日期的苹果数量.
我查看了有关API信息的示例,但无法找到有关如何执行此操作的示例 - 它们主要包括创建文件夹,用户或列出文件夹或工作表或在智能表等上输入信息,但实际上没有实际获取数据.
以下是我看过的代码:https : //github.com/smartsheet-platform/samples/tree/master/c%23 https://github.com/smartsheet-platform/smartsheet-csharp-sdk
但我实际上想把数据作为一个列表拉出来,然后在C#中为最终用户处理它,所以我不想把它放回到智能表中.
是唯一的方法来使用API下载文件作为Excel表格并从那里开始?如果可能的话,我真的想跳过这一步吗?
我应该补充一点,我想使用C#SDK来做到这一点.
我认为我需要输入的具体代码(我认为)是为了得到表格.
// Set the Access Token
Token token = new Token();
token.AccessToken = "INSERT_YOUR_TOKEN_HERE";
long id = "INSERT SHEET ID HERE";
// Use the Smartsheet Builder to create a Smartsheet
SmartsheetClient smartsheet = new SmartsheetBuilder().SetAccessToken(
token.AccessToken).Build();
//Code to get sheet
smartsheet.Sheets().GetSheet(long id, **IEnumerable<ObjectInclusion?includes**).Rows();
Run Code Online (Sandbox Code Playgroud)
这是我不确定他们需要的最后一个参数.它在GetSheet方法中说:
Sheet GetSheet(长id,IEnumerable包含)
这是ObjectInclusion枚举的链接 - http://smartsheet-platform.github.io/smartsheet-csharp-sdk/html/T_Smartsheet_Api_Models_ObjectInclusion.htm