我正在维护一个当前引用 Interop.Excel.dll (v 1.5.0.0) 的网络应用程序。
Interop.Excel.dll 用于访问 Excel 2003 下的 .xls 文件,然后是 Excel 2010 下的 .xlsx/m 文件。一切正常。
该网络应用程序被移动到另一台机器上(安装了“Office 2007 兼容性包”的 Excel 2003),现在无法打开 .xlsx/m 文件(出现如下所示的错误堆栈跟踪)。
除了在打开文件时看到一小段兼容性包“转换”对话框之外,人工打开该机器上的 .xlsx/m 文件没有问题。
是否有一些已知的组合限制:Excel 2003;'Office 2007 压缩包'; 和 .xlsx/m 文件?
堆栈跟踪
2013-04-23 16:03:00.7192|Error|An error occurred in OpenCloseManager. Details Follow:
Exception Type ---
System.Runtime.InteropServices.COMException
Message ---
The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
HelpLink ---
Source ---
Interop.Excel
StackTrace ---
at Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad)
at TCG.CRRExDBInterface.BO.SpreadSheetHelper.manageExcelOpen(Boolean blnUpdateLinks) in D:\foo\ExcelDBInterface-4.7.1.0\ExcelDBInterface-4.7.1.0\ExcelDBInterface\CRRExDBInterface\App_Code\BusinessObject\SpreadSheetHelper.cs:line 1920
TargetSite ---
Excel.Workbook Open(System.String, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object, System.Object)|MasterSubPage.parseSecurityInfoFromSpreadsheetAndSave => SpreadSheetHelper..ctor => SpreadSheetHelper.manageExcelOpen