ASP to Excel

  • Thread starter Konstantin Loguinov
  • Start date
K

Konstantin Loguinov

Guys,

I have been killing myself over this one for a while and can't find what is
wrong. Here is the problem...

I have an ASP application that claculates certain values. It used to be in
Excel and due to complexity of formulas, I couldn't implement Goal Seek
function in ASP. To make Goal Seek work, I dump numbers from ASP into Excel,
run Goal Seek in Excel and then pick up the results from Excel. This works
great on Windows NT 4 and Windows 2000 Pro. It doesn't wanna work on Windows
2000 Server. Same permissions, same everything. It just hangs up. If I try
to open the workbook in Excel after I tried to run Goal Seek in ASP, it does
tell me that it is opened exclusively by IUSR account. So, it seems like it
is able to open the workbook. What am I missing?

Thanks for your help!

Konstantin

P.S.

Here is the relevant portion of the code

Set ExcelApp = CreateObject("excel.application")
Set wb1 = ExcelApp.Workbooks.Open("c:\inetpub\wwwroot\info\apps\Stweb.xls")

ExcelApp.Range("D6") = csng(Request.form("txtDiameter")(epstype))
ExcelApp.Range("D7") = csng(Request.form("txtBedheight")(epstype))
'Bed Height
ExcelApp.Range("D11") =
csng(Request.form("txtGasFlowRate")(epstype)/Request.form("txtSets")(epstype
))
ExcelApp.Range("D12") = csng(Request.form("txtGasPressure")(epstype))
ExcelApp.Range("D13") = csng(Request.form("txtInlet")(epstype))
'Inlet
ExcelApp.Range("D14") = csng(Request.form("txtOutlet")(epstype))
'Outlet
ExcelApp.Range("D15") = csng(Request.form("txtGasTemp")(epstype))
'GasTemp
ExcelApp.Range("D16") = csng(valCO2) 'CO2
ExcelApp.Range("D17") = csng(valO2) 'O2
ExcelApp.Range("D20") = csng(Request.form("txtLabor")(epstype))
'Labor & Disposal

set cellResult = ExcelApp.Range(SetCellNum)
set cellChange = ExcelApp.Range(ChangeCellNum)

'output of the goalSeek function (indicates whether the operation
succeeded or not)
blnGS = cellResult.GoalSeek(ValueCell, cellChange)

Set cellResult = Nothing
Set cellChange = Nothing
ExcelApp.close
Set ExcelApp = nothing
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top