in reply to Re^5: Excel Win32::OLE->Uninitialize
in thread Excel Win32::OLE->Uninitialize

Here's the code: Re^2: Excel exe still hanging 'round

Replies are listed 'Best First'.
Re^7: Excel Win32::OLE->Uninitialize
by traveler (Parson) on Jan 16, 2006 at 20:34 UTC
    Sorry I was unclear. That is the perl script that manipulates the spreadsheet, yes. Now, how is that code invoked?

      I know I'm not using references but it was the way I had learned using functions in perl from existing code and from textbooks I had read. This line of code calls the module I had posted earlier. Basically this perl script is actually a CGI script that (initially) displays an html form whereby a user selects such things as type of report and what columns are used for the x and y axes. The form's action is set to the cgi script (so it calls itself). Once all the form elements have been checked the script can proceed calling the above module. After the call finishes the script continues to re-generate the html page with the previous data re-populating the fields and a message to tell the user the spreadsheet has been created. There is also an in-line javascript that opens a new window to display the newly created chart (basically displays the whole workbook in the new browser window). Hope this additional information helps. Appreciate the help as well. Thanks.

      Rob

      $warning = &swOpenExcel($maxColumns,"FILE",$lAppName,$wbFullDirectory, +$wbChartDirectory,$wbExcelName,$wbExcelData, $dataCol,$strtRow,$labelCol,$endRow,$typeGraph, +$ChartName, $lChartTitle,$lChartCriteria[0],'JPG',$lLegendK +ey,$lData_Labels,*returnVals,*X_Axis,*Y_Axis,*LegendVals);

      20060117 Janitored by Corion: Added formatting, code tags

        It is possible that you are accessing an existing spreadsheet. You can cure this, I believe, by using new instead of getActiveObject.

        To kill excel you'd want to find out which excel process had your particular file open, and then closing that window.