简体   繁体   中英

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. 在此处输入图片说明

在此处输入图片说明

updated each row from another logic app with the help of excel header.

I don't find an action in logic app or a rest api of excel which can delete all of the rows directly. 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. 在此处输入图片说明

2. Then my logic app show as this: 在此处输入图片说明

The "Condition" inside the "For each" is to judge if Column1 is null. If the value of Column1 is null, the " Delete a row " action will show error message.

In "Delete a row" action, I choose Column1 as " Key Column " and put param Column1 into " Key Value " box. 在此处输入图片说明

3. After running the logic app, all of the rows will be deleted. You can add these steps under your " Send an email(v2) " action. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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