如何使用Power Automate从Dataverse创建Excel行?
有人可以将我指向如何使用Power Automate从Dataverse表创建Excel行的教程吗?例如,我有一个数据词表,其中一列之一是“颜色”。对于“蓝色”的每个记录,我都想在Excel文件中添加一行。我很难找到解释这一点的YouTube或博客,但是我敢肯定我的搜索不够好。
我试图连接到Dataverse表,但不确定如何通过所有行循环。也不完全了解数据滤波器中的所有命令,我习惯了powerApps滤波器,但习惯了等式和NE等。
Can someone point me to a tutorial of how to create Excel rows from a Dataverse table using Power Automate? For example, I have a Dataverse table with one of the columns being "color". For every record with "blue", I want to add a row to an Excel file. I'm having a hard time finding a youtube or blog that explains this but I'm sure I'm just not searching well enough.
I've tried to connect to a Dataverse table but not sure how to loop it through all the rows. Also don't quite understand all the commands in the Dataverse filter, I'm used to PowerApps filters but getting used to eq and ne, etc..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有很多方法可以实现您想要的结果。我采用了一种相对简单的方法,该方法应该可以完成您想要的操作,但取决于性能等。您可能想将其更改为其他方法。
首先,我在 DataVerse 中创建了一个表,其中包含一些虚拟字段,显然,您只需要使用自己的表即可。
这是表格的结构,以便您了解上下文,我突出显示了我想要提取的其他字段(以及 ID、名称和创建时间)...
现在在我的流程中,我'已经添加了数据宇宙 ->列出行操作。具体来说,我已根据您的场景将数据过滤到 blue 值的
cr160_color
列中,正如您所希望的那样。下一步涉及遍历从表中检索的数据并将其写入 SharePoint 工作区上的 Excel 文档,该工作区具有表(必须定义为表),其中以下字段。
这是流程中的操作步骤...
当它执行时,我得到我的数据...
如果您运行再次流动,一切都会加倍因此,如果您需要在再次加载之前清除表(如果您觉得麻烦,您可以随时尝试更新或增量加载),那么您可以在加载数据之前插入一个步骤来清除表。
您可以使用 Office 脚本来做到这一点。为此,在 Excel Online 中,功能区中应有一个名为 自动化 的选项卡 ...
在那里,创建一个新脚本,将其命名为清除表数据< /strong> 并添加此代码...
现在,在将所有数据加载回 ...
这是最终流程...
There are quite a few ways to achieve the result you want. I've gone for a relatively easy approach and one that should do what you want but depending on performance, etc. you may want to change it out for something else.
Firstly, I created a table in DataVerse with a few dummy fields, obviously, you just need to use your own table.
Here's the structure of the table so you have context and I've highlighted the additional fields that I want to pull out (along with the ID, Name and Created On) ...
Now in my flow, I've added the Dataverse -> List rows action. Specifically, I have filtered the data to the
cr160_color
column for the value blue as you want to do based on your scenario.The next step involves traversing the data retrieved from the table and writing it out to an Excel document on a SharePoint workspace that has a table (must be defined as a table) with the following fields.
This is the action step in the flow ...
When it executes, I get my data ...
If you run the flow again, it will double up all of the data so if you need to clear the table before loading again (you could always try updating or delta loading if you can be bothered) then you can inject a step before the loading of the data to clear the table.
You can do that with an office script. To do that, in Excel online, you should have a tab in the ribbon called Automate ...
In there, create a new script, call it Clear Table Data and add this code ...
Now inject that step in your flow before it loads all of the data back in ...
This is the final flow ...