79503126

Date: 2025-03-12 09:28:47
Score: 1.5
Natty:
Report link

new Microsoft.Office.Interop.Excel.ApplicationClass() works in X++.

new Microsoft.Office.Interop.Excel.Application() NOT!

Microsoft.Office.Interop.Excel.Application() is defined as interface. X++ cannot use new to make an instance. C# new has special handling for this COM interface.

application = new Microsoft.Office.Interop.Excel.ApplicationClass() do not works for all methods, for example:

Application.union(range1,range2) does work with ApplicationClass.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Duan Xin