I want to use the RDCOMClient to run Excel from R and it works just fine, except that the add-ins, most importantly the "Solver" addin, won't work.
Does anyone know how to solve this issue?
Thanks in advance!
EDIT:
To prevent a real wall of text, here's a little bit of the code from the VBA and the R code. Notice the VBA code is a lot more complex but it runs fine in Excel. I can run other makros via RDCOM the way I do here. So that's why I guess the problem is the actual solver addin from Excel.
VBA:
Sub solve()
SolverReset
SolverOptions precision:=0.001
SolverOk SetCell:="$I$44", MaxMinVal:=3, ValueOf:=0#,...
SolverAdd CellRef:="$E$43", Relation:=1, FormulaText:="$E$32"
SolverAdd CellRef:="$F$43:$G$43", Relation:=3, ...
SolverAdd CellRef:="$H$43", Relation:=1, FormulaText:="$H$32"
SolverSolve userfinish:=True
endsub
R:
xlApp <- COMCreate("Excel.Application")
xlWbk <- xlApp$Workbooks()$Open("...xlsb")
xlSht <- xlApp$Sheets("sheet")
xlApp$Run("solve")