|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Excel process doesn't shut downI am writing c# web application with Excel 2000. My code is: Excel.Application EXL; EXL = new Excel.Application(); Excel.Worksheet WSheet = new Excel.WorksheetClass(); string FileName = MapPath(".") + "\\..xls"; WSheet = (Excel.Worksheet)EXL.Workbooks.Open(FileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing).Worksheets.get_Item(1); Excel.Range rng = WSheet.get_Range("H12", Type.Missing); string H12 = "H12: " + rng.Value2.ToString(); EXL.Workbooks.Close(); EXL.Quit(); Although I use EXL.Quit, Excel process doesn't shut down (still running at windows task manager). Why? Thank you. On Tue, 15 Feb 2005 04:27:03 -0800, "Dudi Nissan" <DudiNis***@discussions.microsoft.com> wrote: ¤ Hello,¤ I am writing c# web application with Excel 2000. ¤ My code is: ¤ ¤ Excel.Application EXL; ¤ EXL = new Excel.Application(); ¤ Excel.Worksheet WSheet = new Excel.WorksheetClass(); ¤ string FileName = MapPath(".") + "\\..xls"; ¤ WSheet = (Excel.Worksheet)EXL.Workbooks.Open(FileName, Type.Missing, ¤ Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, ¤ Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, ¤ Type.Missing).Worksheets.get_Item(1); ¤ Excel.Range rng = WSheet.get_Range("H12", Type.Missing); ¤ string H12 = "H12: " + rng.Value2.ToString(); ¤ EXL.Workbooks.Close(); ¤ EXL.Quit(); ¤ ¤ Although I use EXL.Quit, Excel process doesn't shut down (still running at ¤ windows task manager). Why? See if the following helps: http://support.microsoft.com/default.aspx?scid=kb;en-us;317109 You also need to make certain that you destroy all Excel objects you create. Paul ~~~ pclem***@ameritech.net Microsoft MVP (Visual Basic)
Simple: Excel Jet 4.0 Link vb 2005
RE: For vs. For Each Windows service & Web service Interprocess Communication How to make an assembly search for its dependent DLLs in a specific path (other than the installed d .net and mysql join Method for finding dotnet version How does IIS or Framework set the Content-Length header ? ENTER and forms Record my webcam reflector |
|||||||||||||||||||||||