Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel GetCell "Type mismatch"
#17
In next QM ExcelSheet will have function LoadAddins. Excel does not load addins when started by macro.

Now you can test it.

Member function ExcelSheet.LoadAddins_Test
Code:
Copy      Help
function [flags] ;;flags: 1 run auto open macros

;Loads installed Excel addins (.xla, .xll).

;REMARKS
;When Excel started by Init, it does not load addins. If need, call this function after Init.

;Added in: QM 2.3.3.


Excel.Application a=ws.Application
Excel.AddIn x
foreach x a.AddIns
,_s=""
,if(!x.Installed) continue
,_s=x.FullName
,int failed=0
,if _s.endi(".xll")
,,failed=!a.RegisterXLL(_s)
,else
,,Excel.Workbook b=a.Workbooks.Open(_s) ;;xla
,,if(flags&1) b.RunAutoMacros(Excel.xlAutoOpen); err
,
,err+ failed=1
,if(failed) out "Failed to load %s" _s

;Excel.COMAddIns=a.COMAddIns ;;should load too?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)