We appear to have encountered a regression in Excel COM automation after upgrading Microsoft Office 2021 from build 16.0.14334.20848 to 16.0.14334.20906.
Environment
- Microsoft Office 2021 (Click-to-Run)
- Windows Server hosted on AWS EC2
- C# application using Microsoft.Office.Interop.Excel
- No application code changes between working and failing environments
Working vs. Failing Versions
Office Version (Working) **16.0.14334.20848
**Office version **(**Failing) 16.0.14334.20906
The identical application code continues to work successfully on systems running Office build 16.0.14334.20848.
Problem
After upgrading to Office build 16.0.14334.20906, Excel automation fails during worksheet copy operations.
Error message in .NET:
We couldn't copy this sheet.
at System.Dynamic.ComRuntimeHelpers.CheckThrowException(Int32 hresult, ExcepInfo& excepInfo, UInt32 argErr, String message)
at CallSite.Target(Closure , CallSite , ComObject , Object , Object )
at CallSite.Target(Closure , CallSite , Worksheet , Object , Object )
Error Message in Event Viewer:
Faulting application name: EXCEL.EXE, version: 16.0.14334.20906, time stamp: 0x6a9f74eb Faulting module name: mso20win32client.dll, version: 0.0.0.0, time stamp: 0x6a9f6a0c Exception code: 0x03006542 Fault offset: 0x0000000000236f6d Faulting process id: [Moderator note: Personally Identifiable Information removed] Faulting application start time: 0x01dd407cb96d3187 Faulting application path: C:\Program Files\Microsoft Office\Root\Office16\EXCEL.EXE Faulting module path: C:\Program Files\Common Files\Microsoft Shared\Office16\mso20win32client.dll Report Id: [Moderator note: Personally Identifiable Information removed] Faulting package full name: Faulting package-relative application ID: