Jump to content
Xtreme .Net Talk

screechowl

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by screechowl

  1. I'm having trouble with the Excel Chart object. Does anyone know how to properly create one? The following code works; however, the Excel process hangs. If I comment out the Chart object, then the process does not hang. Dim xlApp As New Excel.Application() xlApp.Visible = True xlApp.DisplayAlerts = False xlApp.UserControl = False Dim xlWrkbks As Excel.Workbooks = xlApp.Workbooks Dim xlWrkbk As Excel.Workbook = xlWrkbks.Add Dim xlWrkst As Excel.Worksheet xlWrkst = xlApp.ActiveSheet() Dim xlChartObj As Excel.Chart = xlWrkbk.Charts.Add System.Runtime.InteropServices.Marshal.ReleaseComObject(xlChartObj) xlChartObj = Nothing System.Runtime.InteropServices.Marshal.ReleaseComObject(xlWrkst) xlWrkst = Nothing xlWrkbk.Close() System.Runtime.InteropServices.Marshal.ReleaseComObject(xlWrkbk) xlWrkbk = Nothing xlWrkbks.Close() System.Runtime.InteropServices.Marshal.ReleaseComObject(xlWrkbks) xlWrkbks = Nothing xlApp.Quit() System.Runtime.InteropServices.Marshal.ReleaseComObject(xlApp) xlApp = Nothing GC.Collect() GC.WaitForPendingFinalizers()
  2. I agree that this works in a VB.net application, but I can't seem to get it to work in ASP.net. Would there be any difference with that?
  3. I've been having the same problem with Excel hanging processes. I copied and pasted the exact code below and it still hangs the process. I've also tried working with the "Process" object, but I get an Access denied error. Any ideas? This is holding up my project big time....
×
×
  • Create New...