ASP to Excel

Discussion in 'ASP General' started by Konstantin Loguinov, Oct 4, 2004.

  1. 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
    Konstantin Loguinov, Oct 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anonieko
    Replies:
    2
    Views:
    7,291
    JackStraw73
    Feb 12, 2008
  2. Robbe Morris [C# MVP]

    asp.net extracting excel charts from an Excel file

    Robbe Morris [C# MVP], Dec 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    463
    Robbe Morris [C# MVP]
    Dec 15, 2006
  3. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,481
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  4. Grey
    Replies:
    4
    Views:
    1,936
    Mark Rae [MVP]
    Oct 17, 2007
  5. fniles
    Replies:
    6
    Views:
    631
    Karl E. Peterson
    Apr 27, 2009
Loading...

Share This Page