When closing an Excel file on a terminal server it saves to a different location than it was in

175 views Asked by At

In our organisation a problem occurs when saving Excel files. Whenever we close a file there is a 50/50 chance that it saves in the location it was already in, but the other times it saves where another file was last saved.

We are all working on a Terminal Server (Windows 2019) using Office 2019.

Did anyone else stumble upon this as well? And perhaps found a solution?

1

There are 1 answers

1
Eugene Astafiev On BEST ANSWER

The Considerations for server-side Automation of Office article states the following:

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.

I'd suggest using the Open XML SDK instead if you deal with open XML documents only, see Welcome to the Open XML SDK 2.5 for Office for more information.