Solver Xlam 2010 Olympics
Hi everyone, I have a problem with VB.NET using excel solver. My problem is that I have a datatable in vb.net with some values and I want to calculate some hard stuff (polynomial equations). I thought that using excel solver would have been the most direct way to find a solution for my polynomials. Based on this, I tried coding something simple to see how VB.NET and ExcelSolver interact. I also spotted some old topics on this issue in the MSDN, but found no solution. Here is the simple code I wrote. I simply created a spreadsheet, put the value of 0 in cell A3 and a simple polynomial in cell B3.
Install Shockwave Player and you'll have access to some of the best content the web has to offer including dazzling 3D games and entertainment, interactive product demonstrations, and online learning applications. Shockwave Player displays web content that has been created by Adobe Director, including content made with previous versions and Director MX 2004. Unlike Adobe Flash, Shockwave Player displays destination web content such as interactive multimedia product demos and training, e-merchandising applications, and rich-media multi-user games. Descargar adobe shockwave player gratis softonic pc.
I created a program in Excel 2010 on my PC that relies on the built-in solver for Excel. I made sure it worked on both Excel 2010 and Excel 2013 for PC. And found that Solver.Xlam is missing. I realized that the address it thinks the solver is at is where the solver is on my PC, but not where it is on OSX. Had similar issues and couldn.
Now, can anybody show me how to start the Solver from VB.NET code and change cell A3 until the polynomial gives B3=0? Thanks a lot, Frenk Imports Microsoft.Office.Interop.Excel Imports System.Runtime.InteropServices Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim oxl As Microsoft.Office.Interop.Excel.Application Dim owb As Microsoft.Office.Interop.Excel.Workbook Dim oSheet As Microsoft.Office.Interop.Excel.Worksheet ' Dim oRng As Microsoft.Office.Interop.Excel.Range ' Start Excel and get Application object. OXL = CreateObject('Excel.Application') oXL.Visible = True ' Get a new workbook. OWB = oXL.Workbooks.Add oSheet = oWB.ActiveSheet oSheet.Cells(3, 1).Value = CDec(0) oSheet.Cells(3, 2).Formula = '=-10+2/(1+A3)^1+3/(1+A3)^2+1/(1+A3)^3+3/(1+A3)^4+3/(1+A3)^5' 'set formula for R oxl.AddIns.Add('C: Program Files Microsoft Office OFFICE14 Library SOLVER SOLVER.XLAM') End Sub End Class.
Hi FrenkMazzi, I've figured out the below code for you, it's an console application. Hi Zhang, many thanks for your reply. I looked at thread you suggested many times, but I got stuck. I think the reason may be because I am using excel 2010 and the thread refers to an older version. When I try running the application it says: 'exception Hresult 0x8002000B DISP_E_BADINDEX Can you give me some hints?
Thanks for your help, Frenk My code is Dim oExcel As Microsoft.Office.Interop.Excel.Application Dim oBook As Microsoft.Office.Interop.Excel.Workbook Dim oSheet As Microsoft.Office.Interop.Excel.Worksheet ' Dim oRng As Microsoft.Office.Interop.Excel.Range Dim oModule As VBIDE.VBComponent Dim MacroCode As String ' Start Excel and get Application object. OExcel = CreateObject('Excel.Application') oExcel.Visible = True ' Get a new workbook. OBook = oExcel.Workbooks.Add oSheet = oBook.ActiveSheet 'Open the solver oExcel.AddIns.Add('C: Program Files Microsoft Office Office14 Library SOLVER solver.xlam') oExcel.AddIns('C: Program Files Microsoft Office Office14 Library SOLVER solver.xlam').Installed = True oExcel.Run('Solver.xlam!Auto_Open') [.]. Hi FrenkMazzi, I've figured out the below code for you, it's an console application.