How to run Excel Solver function from Python

A

Aaron

I am trying to write a Python script file which analyses data in an
iterative manner. During each iteration, I wish to utilise the Solver
function in Excel to perform some constrained, non-linear fitting to
the data. I have a VBA macro which runs the Solver, and am using
self.xlapp = win32com.client.dynamic.Dispatch("Excel.Application")
..
..
..
self.xlapp.run(macro)

I am using the Python script to interface with another software called
ABAQUS and am executing the script through the ABAQUS Python
interpreter (which is Python 2.0). Howvever, when I run the script I
get the error

'Solver : An unexpected internal error has occurred, or available
memory was exhausted'

Could anyone please provide some explanation to this problem? The
macro and Solver run fine if I don't call from the Python script.
Thank you and any help is much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top