使用Power Automate加载选择查询到Excel文件
我已经创建了一个电源自动流量来执行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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,在SharePoint文件夹中创建一个模板Excel文件,您的流将可以访问(
template.xlsx
下面)...现在,复制该工作簿在另一个文件夹中的另一个工作簿中,我已经完成了
完成的
文件夹。从技术上讲,您可以将其放置在任何地方......现在在下一步中,通过在SharePoint网站上调用API来重命名您的文件...
您需要确保输入以下标题然后进行正负(请确保参数为文件名)...
uri:
_api/web/web/lists/getByTitle('documents')/项目(@{outputs('copy_file')?['body/itemId']})
body
现在您有一个真正的Excel工作簿可以使用。
First of all, create a template Excel file in the SharePoint folder your flow will have access to (called
Template.xlsx
below) ...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 ...... now in the next step, rename your file by calling one of the API's on the SharePoint site in question ...
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']})
Body
Now you have a true Excel workbook to work with.