using office (excel) automation from a web server is not supported. runtime errors should be expected, and manual recovery from errors may be required.
Active X Error
We have a Web application that can generate Excel file. We trigger creating the Excel in the front-end and the services will take care of the Excel creation in the background.
Sometimes, we encountered error related to Active X. And sometimes, we don't.
Here are some of 2 patterns we encountered:
①
System.Exception: ActiveX コンポーネントを作成できませんUnable to create Active X component。 場所 Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName) 場所 ExcelOprationLibrary.ExcelLib.get_ExcelApplication() 場所 ExcelOprationLibrary.ExcelLib.OpenNewBook(enAddNewExcelBookOption aiNewBookOption, String acFullBookName) 場所 ExcelOprationLibrary.ExcelLib.OpenBook(String acDirName, String acBookName) 場所 AcNavi.SearchService.ExecOutExcelFile.OutFileToExcel() 場所 AcNavi.SearchService.ExecOutExcelFile.TranData(IDataRead
②
System.Runtime.InteropServices.COMException (0x800A03EC): Workbooks クラスの Add プロパティを取得できません Unable to get Add property of Workbooks class。 場所 Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) 場所 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) 場所 ExcelOprationLibrary.ExcelLib.OpenNewBook(enAd