473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to run Excel Solver function from Python

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.Applicatio n")
..
..
..
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.
Jul 18 '05 #1
1 6953
Having widened my search, I found that this problem seems to be
related to Excel itself and not many have found a solution. But I
found this and it works a treat!!

http://groups.google.com/groups?hl=e...bl%26rnum%3D19

Sorry for posting this problem at the wrong place.
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
0
by: Josh Golden | last post by:
has anyone every used the solver add-in for Excel? it allows you to solve linear and non-linear problems given certain conditions. I was wondering if something like this exists already in .NET? ...
3
by: Mr.Doubt | last post by:
I'm trying to run a Excel macro, which uses SOLVER.XLA Add-In, in VB.NET application. When the macro is executed I get the following error message "Solver: An unexpected internal error occured,...
0
by: engsolnorm | last post by:
A co-worker and I want to increase our knowledge of Python. I have a tiny bit of exposure to python. He has none, but has wide experience with C, C++, NET, C#, etc. We agreed we'd do a Sudoku...
1
by: Laszlo Zsolt Nagy | last post by:
Hello, I would like to use a numerical solver for a specific problem. My problem looks like this: 1. I have numeric constants, named A,B,C etc. 2. I have numeric variables, named x,y,z etc....
2
by: tristan.chaplin | last post by:
Is it possible to use the Excel Equation Solver in an Access Database, ie call it from vba code? Thanks, Tristan
7
by: Holger Fitschen | last post by:
Hi to all, I want to use the Excel solver in a VB.Net project. The macro Sub Makro1Solver() Application.Run "Solver.xla!Auto_Open" SolverReset Worksheets(1).Select...
3
by: akristensen | last post by:
I am new to this site, so be patient if I do not ask the question correctly. Current Target Platform: Browser: MS IE, script language: Javascript (will use VBScript, but JS is preferred), External...
8
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a web site that automates excel. This site runs in server 2003. iis 6.0 office 2003 installed I moved this app to server 2008 iis 7.0 office 2003 installed Now when I try to automate...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.