Excel crashes when Mac goes to sleep

I have a group of four users experiencing the same problem.  They are all using Macs running High Sierra and Office 365.  Additionally, these macs are connected to a Windows 2012 R2 server for file sharing.  Although the problem happens periodically in other applications the primary issue is when they are using Excel.  

User can open an Excel file from the network share and work on it and save it unless the computer goes to sleep.  If, for whatever reason, the computer is idle with the file open and goes to sleep, the file becomes corrupt somehow and they cannot save it.  I've tried to save it back to the share and to other locations (i.e. desktop) but it does not work.  Basically the file will not save anywhere.  As long as it is open, they can continue to work in the excel document, they just can't save it.  They receive an error similar to the attached image.Excel Error
LVL 1
tmartin40Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

serialbandCommented:
First thing to do with all Macs connecting to Windows shares is to turn off writing directory stores to network shares.
Open Terminal.app and run the following command in each user's account:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

Unfortunately, when they idle out, they disconnect improperly.  You lost the actual network share connection within Excel.  Try to do a Save As, instead of a Save.  Do not edit files on a Windows share from Mac, because Apple threw out SAMBA and rewrote their SMB stack because they didn't want to be saddled with GPLv3.  Apple's version is seriously broken and not fully compatible with Windows SMB.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tmartin40Author Commented:
When the save failed but the file was still open, I tried save and save as.  Tried saving it (using save as) to different locations.  It just didn't work.  As I am not a Mac guy, I am a little confused.  Are you saying that running "defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE" from terminal on all user machines (there are four of them), this will solve the problem?

I had someone else tell me to install "Automounter" and this would solve my problem.  Have you ever heard of this?
serialbandCommented:
No, the DSDontWriteNetworkStores will mainly prevent Mac user contention when accessing the same folders, so they don't try to write the .DS_Store folders at the same time.

Automount is a built-in (unix) function

https://useyourloaf.com/blog/using-the-mac-os-x-automounter/
tmartin40Author Commented:
okay thanks.  I appreciate the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.