首页 文章

如何显示来自两个sharepoint列表的合并数据并在excel中显示它

提问于
浏览
0

我有两个SharePoint列表A和B,它们有2个相同的列,即“任务”和“详细信息” . 我想合并两个列表中的数据并将其显示在excel表中,每次打开时都会显示当前数据 . 我知道如何在excel中显示一个列表的数据,我熟悉链接数据源的概念,以合并两个列表的数据并使用sharepoint设计器在aspx页面中显示但不确定如何在excel中显示它

1 回答

  • 0

    有几个选项,但我知道它使用的是SharePoint REST API .

    您只需要创建2个查询,然后使用"Append"或"Merge"来获得结果组合,这里是一个示例:您有两个名为 ListAListB 的列表,您可以像使用REST API调用一样查询Excel,类似于以下:

    对于第一张表:

    http://domain-name/_api/web/lists/GetByTitle('ListA')/items?$select=Title,Task,Details
    

    第二张表:

    http://domain-name/_api/web/lists/GetByTitle('ListB')/items?$select=Title,Task,Details
    

    enter image description here

    将数据源(QUERY1和QUERY2)放入Excel后,可以转到合并或追加,并将两个查询合并到一个新数据中:

    enter image description here

    enter image description here

    这是一个APPEND的例子:

    enter image description here

    这是一个MERGE的例子:

    enter image description here

相关问题