Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Perl r/w Excel with OLE

by davies (Parson)
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.


John Davies

Replies are listed 'Best First'.
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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://978872]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-05-27 23:50 GMT
Find Nodes?
    Voting Booth?