I have a excel add-in (OpenSolver specifically) and I use their VBA API to build a model.
I call it like:
opensolver.ResetModel opensolver.AddConstraint ..