Powershell (?) run a task that open and closes a Sharepoint excel file in the desktop version

Mata Ricardo 5 Reputation points
2024-04-24T06:37:18.2933333+00:00

I need to open an Excel file from sharepoint in the desktop app daily many times a day, keep it open a couple of minutes and have it close. This so the file updates itself, as it is connected to external data.

Can this be acomplished in some way?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | Excel | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-04-24T09:35:33.7766667+00:00

    Hi @Mata Ricardo,

    Thank you for posting in this community.

    Unfortunately, PowerShell doesn't seem to be able to close Excel files automatically. Perhaps you could try using Power Automate to create streams to close Excel automatically. It provides a way to close Excel.

    User's image

    Reference: Close Excel.

    Since our team is mainly responsible for SharePoint related issues, we are missing information related to Power Automate. If you have a related question, visit this Power Automate Community and ask your question.

    Thank you for your kind understanding.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.