使用Power Automate加载选择查询到Excel文件

发布于 2025-01-23 17:30:53 字数 288 浏览 0 评论 0原文

我已经创建了一个电源自动流量来执行SQL查询并每天以Excel格式创建SharePoint文件,并将检索到的选择查询加载到Excel文件中。谁能建议在下面的屏幕截图中提出什么,以及如何将数据加载到SharePoint中的Excel文件中?

I have created a power automate flow to execute a sql query and create a sharepoint file in excel format everyday and load the retrieved select query to the excel file. Can anyone suggest what to provide in file content in the below screenshot and also how to load data into excel file in sharepoint?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

从来不烧饼 2025-01-30 17:30:53

首先,在SharePoint文件夹中创建一个模板Excel文件,您的流将可以访问(template.xlsx下面)...

“

现在,复制该工作簿在另一个文件夹中的另一个工作簿中,我已经完成了完成的文件夹。从技术上讲,您可以将其放置在任何地方...

“复制文件”

...现在在下一步中,通过在SharePoint网站上调用API来重命名您的文件...

您需要确保输入以下标题然后进行正负(请确保参数为文件名)...

uri: _api/web/web/lists/getByTitle('documents')/项目(@{outputs('copy_file')?['body/itemId']​​})

键值x
-http-method合并
如果鼠标,请*
content-typeapplication/json; odata = verbose

body

{
  "__metadata": {
    "type": "SP.Data.Shared_x0020_DocumentsItem"
  },
  "FileLeafRef": "New File Name.xlsx"
}

现在您有一个真正的Excel工作簿可以使用。

First of all, create a template Excel file in the SharePoint folder your flow will have access to (called Template.xlsx below) ...

Template Workbook

Now in your flow, copy that workbook to another workbook in another folder, I've done that to the Completed folder. Technically, you could put it anywhere though ...

Copy File

... now in the next step, rename your file by calling one of the API's on the SharePoint site in question ...

Rename File

You need to make sure you enter the following headers and then body (be sure to parameterise your filename though) ...

Uri: _api/web/lists/getbytitle('Documents')/items(@{outputs('Copy_file')?['body/ItemId']})

KeyValue
X-HTTP-MethodMERGE
If-Match*
Content-Typeapplication/json;odata=verbose

Body

{
  "__metadata": {
    "type": "SP.Data.Shared_x0020_DocumentsItem"
  },
  "FileLeafRef": "New File Name.xlsx"
}

Now you have a true Excel workbook to work with.

Renamed File

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文