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
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