fixexcelpowershell

Fix: Editing Excel Documents With Powershell as Scheduled Job Fails

Summary: When automating excel tasks with powershell as a scheduled job you might run into issues, as server-side office tasks are not always that easy. But sometimes the fix is very easy.
Date: Around 2019
Refactor: 2 January 2025: Checked links and formatting.

Due to some weird issues with excel or powershell (nobody knows for sure although Microsoft claims it's not supported here ) it seems impossible to edit, create or save Excel documents with powershell when running it as a scheduled job, when set that the user running the task does not have to be logged on. Searching the Internet there is a solution, which worked for me and a lot of other people. You'll have to create some folders depending on if you're running Windows in 32bits or 64bits:

You'll always have to create this folder:

C:\Windows\System32\config\systemprofile\Desktop

And if you're running 64bits you also have to create this folder:

C:\Windows\SysWOW64\config\systemprofile\Desktop

Now it will work.

fixexcelpowershell.txt · Last modified: by 127.0.0.1

Exception: Git command failed to perform periodic pull: From https://dev.azure.com/getshiftingcom/Documentation/_git/knowledge * branch main -> FETCH_HEAD fatal

Exception: Git command failed to perform periodic pull: From https://dev.azure.com/getshiftingcom/Documentation/_git/knowledge * branch main -> FETCH_HEAD fatal

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the gitbacked plugin.

More info has been written to the DokuWiki error log.