|
|
Subject:
Using EXCEL Solver in MFC
Category: Computers > Programming Asked by: kundalini-ga List Price: $6.00 |
Posted:
14 Aug 2004 06:37 PDT
Expires: 13 Sep 2004 06:37 PDT Question ID: 387753 |
I have a problem in calling the Microsoft Excel Solver Add-in from my VC++/MFC application. I used ole automation to invoke excel from my application. I was able to place values and simple formulas in cells and get the results in excel from my application. I tried to invoke the Solver add-in thru "ExecuteExcel4Macro" method given by the excel application object. It returns a COleDispatchException error "The formula you typed contains an error". After this error message i checked the formula placed in the cell and even used EXCEL Formula Audit feature to check it, there seems to be no problem with the formula entered in the cell. How inspite of the formula being properly entered in the EXCEL by my code, the above error message occurred. The example i tried for this code was a simple function minimization for the equation X^2 + Y^2 - Z^2 with X = 8, Y and Z as unknowns. I called "Solver.OK" and "SOLVER.SOLVE" methods using the ExecuteExcel4Macro method provided by the excel application object. All the parameters passed to these functions also seem to be correct. What would have caused the error message and how do i rectify?. |
|
There is no answer at this time. |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |