从 Smartsheet api 中检索某些列作为 csv?

Retrieve certain columns from Smartsheet api as csv?

是否可以使用 Smartsheet api 仅从 sheet 中检索某些列作为 csv? get sheet 方法应该接受 columnIds 作为参数,但我无法让它工作。也许这是因为我选择 csv 作为可接受的响应类型并且那里不支持该选项?我正在使用 cURL。

Get Sheet as Excel/PDF/CSV operation doesn't support all of the same parameters that the regular Get Sheet operation does. (See the docs I've linked to for details about supported parameters.) Therefore, the scenario you've described (getting only certain columns of data when retrieving the sheet in CSV format) isn't supported, since the Get Sheet as Excel/PDF/CSV操作不支持columnIds参数。

作为 not-very-efficient 解决方法,您可以通过使用多个 API 请求来实现您想要的结果:

  1. 调用Copy Sheet操作创建sheet的副本。

  2. 为要从 sheet.

    的新副本中删除的每一列调用一次 Delete Column 操作
  3. 调用 Get Sheet as CSV 操作来检索 sheet 的新副本(您刚刚删除了不需要的列)。

  4. 调用 Delete Sheet 操作删除 sheet 的新副本,现在您已检索到它。

当然效率不高,但这应该能让您得到想要的结果。也许值得考虑这是否是您正在做的 one-time 事情。