Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 使用api调用获取google sheet filter视图数据_Node.js_Google Sheets Api - Fatal编程技术网

Node.js 使用api调用获取google sheet filter视图数据

Node.js 使用api调用获取google sheet filter视图数据,node.js,google-sheets-api,Node.js,Google Sheets Api,这里我能展示的代码真的很少。我正在使用node.js的api调用google sheets电子表格 在电子表格中,我创建了一组过滤器视图。是否有一种方法可以告诉api调用过滤后的数据,而不仅仅是获取工作表中的所有数据 const dataFromGoogleSheets = `https://sheets.googleapis.com/v4/spreadsheets/${ config.spreadsheetId }/values:batchGet?ranges=${"Sheet1"}&am

这里我能展示的代码真的很少。我正在使用node.js的api调用google sheets电子表格

在电子表格中,我创建了一组
过滤器视图
。是否有一种方法可以告诉api调用过滤后的数据,而不仅仅是获取工作表中的所有数据

const dataFromGoogleSheets = `https://sheets.googleapis.com/v4/spreadsheets/${
  config.spreadsheetId
}/values:batchGet?ranges=${"Sheet1"}&majorDimension=ROWS&key=${
  config.apiKey
}`;
更新

sheets.spreadsheets.values.get(
    {
      spreadsheetId: "mySpreadSheetID",
      filterViewId: 121321321,
      title: "Filters"
    }
)

无法使用活动的FilterView从Sheets API或Google Apps脚本获取数据

如注释中所述,您可以从FilterView获取条件,并在数据之上重新处理它


您也可以在上为此提交功能请求。

此问题是关于还是关于?你已经在中查看了相应的文档了吗?我认为这是一个google sheets api问题。我看过文件了。他们建议加入
/edit#gid=66666&fvid=121321
。当我将其添加到
constdatafromgooglesheets=https://sheets.googleapis.com/v4/spreadsheets/${config.spreadsheetId}/edit#gid=66666&fvid=121321/values:batchGet?ranges=${“Sheet1”}&majordmension=ROWS&key=${config.apiKey}
;`它返回地址处的无效json响应正文@鲁贝n@bp123您希望使用Node.js从包含基本筛选器的工作表中检索筛选值。如果我的理解正确,您是否使用Node.js的googleapis或其他工具?这就是我试图使用Node所做的@Tanaike@bp123谢谢你的回复。我编辑了你的标签。