简体   繁体   English

如何使用逻辑应用清除或删除 Onedrive 或 Excel 上的文件数据?

[英]How to clear or remove the file data on Onedrive or Excel using Logic app?

I need to schedule for an everyday run, once it ran and sent a mail, the excel or onedrive data need to clear.我需要安排日常运行,一旦运行并发送邮件,excel 或 onedrive 数据需要清除。 在此处输入图片说明

在此处输入图片说明

updated each row from another logic app with the help of excel header.借助 excel 标题从另一个逻辑应用程序更新每一行。

I don't find an action in logic app or a rest api of excel which can delete all of the rows directly.我在逻辑应用程序或 excel 的 rest api 中找不到可以直接删除所有行的操作。 So I think we can just loop " Delete a row " action to delete the rows one by one.所以我认为我们可以循环“ 删除一行”操作来逐行删除行。 Please refer to my logic app as below:请参考我的逻辑应用程序如下:

1. First I use "List rows present in a table" action to list all of the rows. 1.首先,我使用“列出表中存在的行”操作来列出所有行。 在此处输入图片说明

2. Then my logic app show as this: 2.然后我的逻辑应用程序显示如下: 在此处输入图片说明

The "Condition" inside the "For each" is to judge if Column1 is null. “For each”里面的“Condition”是判断Column1是否为空。 If the value of Column1 is null, the " Delete a row " action will show error message.如果Column1值为空,则“删除一行”操作将显示错误消息。

In "Delete a row" action, I choose Column1 as " Key Column " and put param Column1 into " Key Value " box.在“删除一行”操作中,我选择Column1作为“关键列”并将参数Column1放入“关键值”框中。 在此处输入图片说明

3. After running the logic app, all of the rows will be deleted. 3.运行逻辑应用程序后,将删除所有行。 You can add these steps under your " Send an email(v2) " action.您可以在“发送电子邮件(v2) ”操作下添加这些步骤。 Or if you want to do it in another logic app, you can use " When a new email arrives (V3) " as the trigger of the logic app.或者,如果您想在另一个逻辑应用程序中执行此操作,则可以使用“ 新电子邮件到达时 (V3) ”作为逻辑应用程序的触发器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM