Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is the Spreadsheet module capable of performing similar functions as Win32::OLE when it comes to creating new workbooks/worksheets, modifying/manipulating data, creating charts/graphs, etc..,? Which one would "you" suggest using? The Win32::OLE module is fine for doing all of those things it's just I can't close the Excel.exe processes down once the module has finished. I tried using Quit and Uninitialize and none seem to work (at least on our customers site but locally it does - from command prompt and as a CGI app). Also how can I grab the process ID for the Excel.Application when initializing the Excel process this way :
$swExcel = Win32::OLE->GetActiveObject('Excel.Application') || Win32:: +OLE->new('Excel.Application', 'Quit');
Appreciate the help monks. If you aren't sure could you go ahead and ask the big guy? Thanks.

Rob

formatting/code tags added by jdporter

Replies are listed 'Best First'.
Re: Alternative to Win32::OLE when using Excel?
by Limbic~Region (Chancellor) on Jan 17, 2006 at 15:32 UTC
    Rob,
    You asked several questions which I am not qualified to answer having only used Win32::OLE a few times. I can tell you that support for charts in Spreadsheet::WriteExcel is experimental and can't be generated ad hoc at runtime. You are required to create which ever charts you want ahead of time, extract the binary representation, and then change the data set it is bound to at runtime.

    Cheers - L~R

Re: Alternative to Win32::OLE when using Excel?
by VSarkiss (Monsignor) on Jan 17, 2006 at 15:54 UTC
      Vsarkiss,
         Do you agree with the statements regarding creating Charts in the Spreadsheet module is experimental and they need to be created beforehand? If charts need to be created beforehand and all the other steps mentioned have to be followed then Win32::OLE is by far the only real option I have. Do you know how I can grab the process ID from the Excel object then when using the GetActiveObject method? If need be I might just go about "Ending the Process"es using the system function if I can't find another way of killing the Excel processes started. I'm open to other suggestions but right now I can't have these Excel.exes building up in Task Manager. Appreciate any help.

      Rob

      formatting added by jdporter

        rpike, why do you continue to post anonymously rather than logging in?
        And how can you not have realized by now the simple fact that post contents are HTML formatted?

        We're building the house of the future together.
Re: Alternative to Win32::OLE when using Excel?
by davidrw (Prior) on Jan 17, 2006 at 18:15 UTC