Information générale
Catégorie:
COM/DCOM et OLE Automation
Solver is an Excel ADD-in. So I believe you need to call it like:
ObjExcel.Application.Run("SOLVEROK", "$C$4",2,"0","$C$4:$C$7")
(though I never used it myself)
Usually Add-ins do not work in VFP without reinstalling. So probably you need to add something like this:
* check what Addins Titles are available
if ObjExcel.Application.Addins.Count<=0
? "Terminating. NO add_ins are available!"
return
endif
lnAddins=0
for ia=1 to ObjExcel.Application.Addins.Count
if "SOLVER" $ upper(ObjExcel.Application.Addins(ia).Title)
lnAddins=ia
EXIT
endif
endfor
if lnAddins=0
? "Terminating. 'SOLVER' addin notavailable!"
return
endif
with ObjExcel.Application.Addins(lnAddins)
.Installed=.f. && remove
.Installed=.t. && add
endwith
...
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement