asp.net - Trigger excel solver from vb.net web app -
using vb.net, visual studio 2013 , excel 2010.
i have web page , when button clicked values passed page excel ( presaved formatted copy). want run solver add in (which have preconfigured). have been searching while , cannot find way of doing this.
the below code use open excel application
dim xlapp excel.application dim xlworkbook excel.workbook dim xlworksheet excel.worksheet xlapp = new excel.application xlapp.visible = true xlapp.displayalerts = false xlworkbook = xlapp.workbooks.open("c:\temp\rto.xlsx") xlworksheet = xlworkbook.sheets("optimiser")
another curious problem may related when open excel web page solver addin enabled in excels options not appear in data ribbon tab. if disable , enable in options comes back.
update
i tried following code
xlapp.run("c:\program files\microsoft office\office15\library\solver\solver.xlam!auto_open")
but errors following
additional information: cannot run macro 'c:\program files\microsoft office\office15\library\solver\solver.xlam!auto_open'. macro may not available in workbook or macros may disabled.
ok,
1) website populates excel data , streams excel client. 2) client fill out or manipulates stuff in excel. 3) clicks button solve , perhaps submit excel...(where stuck)
step 3 accomplished small 'one click application ' aka 'clickonce', whereas application online , served site. take 1 cell of excel , have open ie , point installer, , pass parameters (be sure allow params pass in app) excel located. app interop excel , stuff, perhaps deliver data server.
Comments
Post a Comment