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

How can I start Excel and open a text file in Excel using Win32::OLE. I know this much:
use Win32::OLE; my $ex = Win32::OLE->new('Excel.Application') or die "oops\n"; my $obj = Win32::OLE->GetObject("C:\\TEMP\\text.txt");
Can you help me with the rest?

Replies are listed 'Best First'.
Re: open a text file with Excel using Win32::OLE
by mce (Curate) on Oct 28, 2002 at 08:35 UTC
    Hi,

    You are almost there.

    You only miss the $obj->{Visible}=1; line to make it appear on the screen, since COM objects are not visible on the screen by default.

    (see book WIN32 Perl Programming, 2de edition book page 225)
    ---------------------------
    Dr. Mark Ceulemans
    Senior Consultant
    IT Masters, Belgium