Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl r/w Excel with OLE

by davies (Vicar)
on Jun 28, 2012 at 09:37 UTC ( #978872=note: print w/ replies, xml ) Need Help??


in reply to Perl r/w Excel with OLE

use strict; use warnings; use Win32::OLE; my $xl = Win32::OLE->new('Excel.Application'); $xl->{Visible} = 1;

The code above is how I start working on Excel using Perl. Notice the last line. This makes the instance of Excel visible so that, should my code crash, I can close it manually. I frequently comment it out once the code is finished, but I find it impossible to develop for Excel without seeing what Excel is doing.

The other way to get rid of an orphaned instance of Excel is to bring up the task manager, select the application and then instruct the task manager to close it.

Regards,

John Davies


Comment on Re: Perl r/w Excel with OLE
Download Code
Re^2: Perl r/w Excel with OLE
by Henry07 (Initiate) on Jun 28, 2012 at 09:57 UTC

    Hello Corion and Davies,

    So I have build in the "visible"
    and killing the process EXCEL.EXE in the task manager works fine.

    Thank you for all the inputs
    Henry

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://978872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-08-30 15:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls