question

HannsSedlmayr-4909 avatar image
0 Votes"
HannsSedlmayr-4909 asked CaseyYangMSFT-4714 commented

Excel template cannot be deleted offline from the template Folder

Problem:
Orders are sent as an Excel template from the headquarter to a SharePoint folder "Orders for the fitter" and processed there by a fitter on his tablet. The fitter opens the Excel and marks the work he has done. A software (VBA) saves the edited Excel to a folder "completed orders" under a new name, closes the template and then deletes the template for the order in the folder "Orders for the fitter". This only works as long as the fitter is online. If he is offline, only the completed job is created in the "Completed Jobs" folder



and the completed job is not removed from the "Jobs for the Fitter" folder.
It can be demonstrated that the Excel to be deleted is closed. Nevertheless, it will not be deleted.
It can also be demonstrated that basically deleting this Excel from another Excel works offline, just not from the generated Excel stored in the folder "completed jobs".

Cause:
Cause is OneDrive denies access. If you stop OneDrive by hand, before editing, the Excel template will be deleted from the folder "Jobs for the fitter" even if there is no Internet and a move is also possible.

Error Message:
The error message denying deletion by VBA is "Access Denied". The Excel template can be deleted manually.

Required solution:
A solution is required that allows a program to delete the template from the folder "Orders for the fitter".

This Problem was already a support Case request (29445475)

Raul sent me a solution, I tested the solution and it seemed to work and we closed the Case. But later I found I was wrong, it does not work, I did not test correct, probably OneDrive was closed when we tested, and I did not recognise it.

office-sharepoint-onlineoffice-sharepoint-server-administrationoffice-sharepoint-server-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CaseyYangMSFT-4714 avatar image
0 Votes"
CaseyYangMSFT-4714 answered CaseyYangMSFT-4714 commented

Hi @HannsSedlmayr-4909,

Have you used Power Automate flow to delete this file?

1.Create an automated cloud flow > When a file is created in a folder

187748-1.jpg

2.New step > Delete file

187777-2.jpg


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



1.jpg (75.2 KiB)
2.jpg (53.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HannsSedlmayr-4909,

Is there any progress on this thread? Please comment here if you still need help.

0 Votes 0 ·